Failed to release snap

I have successfully snapped and tested my app simple-pwgen. However, when I tried to release it on snap-store, I am getting the following errors.

First I tried to upload the pre-built snap using snapcraft upload simple-pwgen_1.0.9snap+git9.7ff545a_amd64.snap --release=latest/edge/master. With this I am getting the following error:

Issues while processing snap:g                                                                                                                                                                                    
- human review required due to 'deny-connection' constraint (interface attributes)
- package contains external symlinks: bin/python -> python3, bin/python3 -> /snap/gnome-3-38-2004-sdk/140/usr/bin/python3.8     

I also tried using the launchpad build feature by connecting the git repo. The corresponding latest log can be found at https://snapcraft.io/simple-pwgen/builds/2020576.

try patching your binary to use #!/usr/bin/env python3 and make sure to remove the symlink in your package … the deny-connection is caused by the dbus interface which will need manual approval …

Hi @hsbasu, The gnome extension does not play well with the python plugin. This is the first error you will run into in my experience and was documented at Core22 gnome extension and broken symlinks and as far as I can tell there have been issues with the gnome extension + python as far back as 2020 according to Gnome-3-34 extension and Python segfault

The good news is that Unrud did an excellent job documenting his workarounds in the video downloader snap at https://github.com/Unrud/video-downloader/blob/master/snap/snapcraft.yaml and I have abbreviated at Python Plugin + Gnome 3 Extension Error

Hope that helps you after you get past the symlink issue.

Regarding the dbus name - you should have an email about this (the current name of org.x.simple-pwgen is too generic as org.x is a non-specific prefix - instead this should be tied to the upstream project, so perhaps something like io.github.hsbasu.simple-pwgen)

Hi Alex, I received your mail.

Regarding the dbus name - you should have an email about this (the current name of org.x.simple-pwgen is too generic as org.x is a non-specific prefix - instead this should be tied to the upstream project, so perhaps something like io.github.hsbasu.simple-pwgen)

I was thinking of changing the dbus name in the upcoming release.

Also, I was trying to follow the conventions used by the Mint team, as all their utility apps like webapp-manager, clicky and others use the same convention for their gschema files. Can you please explain this a little elaborately? Whether dbus and the gschema files are related or how?

dbus name and gschema files are not directly related but it is good practice to use the same identifier for both (plus for the application ID in general) - see https://developer.gnome.org/documentation/tutorials/application-id.html

I’m also getting the external symlinks error which prevents my snap publishing to the snapstore. How exactly do I remove the symlinks - via some additional commands in my snapcraft.yaml? The exact error I’m getting is

Issues while processing snap:
- package contains external symlinks: bin/python -> python3, bin/python3 -> /snap/gnome-42-2204-sdk/67/usr/bin/python3.10, bin/python3.10 -> python3

My snapcraft.yaml is based on the yt-dlg one. Hopefully I don’t need to also “patch any binaries”.

I worked around the issue instead of removing the symlinks. Did you see my post at Failed to release snap ?

Ok I followed the steps in Core22 gnome extension and broken symlinks viz

  1. unsquashfs <snapname>
  2. rm squashfs-root/bin/python*
  3. snap pack squashfs-root

but step 3 fails because python3 cannot be found anymore:

$ snap pack squashfs-root
2023/03/08 18:40:08.157998 container.go:215: in snap "pynsource": path "bin/python3" does not exist
error: cannot pack "squashfs-root": snap is unusable due to missing files

Presumably we want to keep at least one real python3 binary around to run the python app inside the snap - why is the workaround deleting all the python binaries in step 2? How is my python app supposed to run?

Update: Or are you referring to your workaounds marked with #WORKAROUND made to snapcraft.yaml Python Plugin + Gnome 3 Extension Error My https://github.com/abulka/pynsource/blob/master/snap/snapcraft.yaml already has some of those workarounds (as inherited from the yt-dlg snapcraft.yaml) but the build-environment: paths are different and I have no stage: step. Ironically, I tried adding the additional workarounds and got a similar error Cannot pack snap file: Command '['snap', 'pack', '--filename', 'pynsource_0+git.11509e6_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1. (container.go:215: in snap "pynsource": path "bin/python3" does not exist error: cannot pack "/root/prime": snap is unusable due to missing files)

This. As far as I can tell, all of those are workarounds are required. If you don’t have a stage step you may need to add it so the workaround can be utilized by snapcraftctl.

It looks like the python app you’re packing is using wxWidgets. The app I packed also uses wxWidgets, python and the gnome extension on core22. Feel free to take a look https://github.com/goldstar611/chirp/blob/master/snap/snapcraft.yaml

@alexmurray As you suggested, I changed the dbus name to org.mamolinux.simple-pwgen. But still the builds are getting rejected. Do you have any further suggestion?

Thanks I have approved use of this dbus name - org.mamolinux.simple-pwgen

However, the snap is still failing the automated review due to the issue with external symlinks:

package contains external symlinks: 
  bin/python -> python3, 
  bin/python3 -> /snap/gnome-3-38-2004-sdk/171/usr/bin/python3.8

Please fix this issue and the snap will pass automated review.

Hey @hsbasu, let us know if you’re facing any issue in resolving above python3 symlink errors

thanks

@hsbasu ping,

I see revision #19 released. Do you need any further assistance? Otherwise we can close this request and remove it from our review queue.

Thanks!

The problem has been fixed after migrating to core22 and using extension gnome.

@emitorino I recently updated the snapcraft.yml, and then the build got rejected. Do I have have to obtain permission again? What about every time I change the snapcraft.yml? Would it need to be approved every time? Thanks in advance.

hey @hsbasu sorry for the delay

No, not at all. Unless there are further changes that require review. What I can see in the last revision, is that there is an error with arch specific binaries found, but then snanpcraft.yaml has:

architectures:

  • all

You should have received a notification about this error.

Hi @emitorino , I didn’t receive any error when I tested on my system. If I should not use all, Can you suggest anything? So that this would work on any architecture like,

architectures:
  - build-on: [amd64, other arch]

Or something like this.