Core18 snap fails to run on 16.04 - cannot locate the core snap

After building a core18 app (see my snapcraft.yaml) it pushed ok to the store and I was able to install it on another Ubuntu 18.04 system OK.

I then successfully installed on Ubuntu 16.04 using the command line sudo snap install andy-testsnap-py --edge but when I ran it I got the error

cannot locate the core snap: No such file or directory

Any ideas on what is going wrong?

What’s the Snapd version 16.04 is using? Run snap version and snap list in a terminal and post the output here.

$ snap version

snap    2.34.2ubuntu0.1
snapd   2.34.2ubuntu0.1
series  16
ubuntu  16.04
kernel  4.15.0-46-generic

$ snap list

Name              Version  Rev  Tracking  Publisher  Notes
andy-testsnap-py  0.5.2    5    edge      andyxxxxx  -
core18            18       731  stable    canonical  base

Can you run the snap after installing the core snap?

The core18 snap installed itself automatically when I first installed my andy-testsnap-py snap. I never installed it myself. Running andy-testsnap-py now gives the same error: cannot locate core snap.

P.S. I just restarted my virtualbox vm containing 16.04 and got the error during startup: “The application Snap user application autostart helper has closed unexpectedly”, Executable path /usr/lib/snapd/snap-confine, Package snapd 2.34.2ubuntu0.1, ProblemType Crash, ApportVersion 2.20.1-0ubuntu2.18, Architecture amd64 etc.

The core “core snap” is different from the core18 “base snap”, please install the core snap manually and verify if the issue is still reproducible.

FYI: The snap command will use the snapd distribution in the core snap if found, so there’s two (possibly different) snapd distributions exist simultaneously in the system.

A stack trace will be helpful

Thanks - installing sudo snap install core fixed the problem.
Before I only had core18, now I have core18 and core.

andy@andy-VirtualBox:~$ snap list

Name              Version  Rev  Tracking  Publisher  Notes
andy-testsnap-py  0.5.2    5    edge      andyxxxxx  -
core18            18       731  stable    canonical  base

andy@andy-VirtualBox:~$ sudo snap install core andy@andy-VirtualBox:~$ snap list

core 16-2.37.2 from 'canonical' installed

Name              Version    Rev   Tracking  Publisher   Notes
andy-testsnap-py  0.5.2      5     edge      andyxxxxx   -
core              16-2.37.2  6405  stable    canonical✓  core
core18            18         731   stable    canonical✓  base

andy@andy-VirtualBox:~$ andy-testsnap-py

worked! :grinning:

So in summary, I have to tell my users that to use my app on Ubuntu 16.04 they can’t install via the UI but need to type

sudo snap install andy-testsnap-py --edge
sudo snap install core
andy-testsnap-py

then right click on the icon in the dock to add the app to their favourites. Not an ideal user experience. Why isn’t core auto installed as well as core18?

P.S. I rebooted the vm prior to trying this, and didn’t get the other startup error I described. Rebooted again after the above steps and still no error, so perhaps it has settled down…

The core snap should be pre-installed in Ubuntu 16.04 desktop IIRC.

There are no pre-installed snaps on 16.04. It just ships a .deb packaged snapd that can bootstrap the system.

I guess the core snap (together with an updated snapd) only gets installed if another requested snap uses it as a base. Given that the core snap is also used to get an up to date snapd onto the system, perhaps it should be installed even if you only install core18 snaps. At least until we start using the snapd snap on classic systems.

1 Like

That would be indeed preferable.