I can't install snaps without them breaking. What am I dong wrong?

Snap packages are installing just fine, initially.
I’m able to add the snap app to the VM applications menu.
The apps work as expected… until…

…I shut down the VM, and restart the VM.

After that they show broken.

With the VM loaded, I remove, reinstall. The snap app works, but settings are gone. Once l I shut/down/restart the VM the snaps are broken.

I suspect this has something to do with file permissions, and/or where the snap package is saving config files.

I don’t know where to start though, on how to fix it.

Anyone run into this problem, and have a fix?

Have you read this part of the docs?

Yes, I did, and followed it with precision.
The snapd & snap helper is installed in the templates.
The snap packages are installed in the VM.
So far, they break every time I shut down/restart the VM.

Have you tried this?


If I use that solution, I’m installing the snap helper in the appVM.

As I comprehend it, snap helper works with the update script, keeping the snaps in the VM, but the updates piped thru the updater?

Is this correct?

So with that in mind, what happens if I install snapd & snap update in the AppVM when I run the update script?

I have no idea… but it seemed to fix the same problem you are having. Either way, I don’t think it would have a negative impact on performance or security. The AppVM is already a copy of the template.

Given that it somehow helped a similar issue, maybe the snapd and snap helper installation in the template is putting files in the home directory that are lost when the AppVM is spawned - perhaps a reference to something in the root directory? So by installing snapd and snap helper in both the template and AppVM, all necessary files will persist, allowing subsequent reboots of the AppVM to perform as expected. I really have no idea. It’s a goofy fix to be sure.

1 Like

also moved to ‘User Support’

I believe some important directory is missing from bind-dirs for snapd. /var/snap probably.

I have had the same issue. Installing snapd and qubes-snapd-helper in both the template and the app vm solved it for me.

One observation I have made that might help others to better understand what is going on. When starting the app vm, a notification popped up, stating that the disk /var/lib/snapd/snaps/… got removed.

Edit: Looks like this is not always working. I did the same in another app vm and guess what, it did not solve the issue.

Edit 2: It does work given you do things in the right order. 1. Install snapd and qubes-snapd-helper in the template then shutdown the template. 2. Remove snapd and qubes-snapd-helper in the app vm and install it again (no restart in between).

for anyone this can help —=> in 4.0.4 tried for 2 days w/deb11 template but couldn’t get snap working using ideas/fixes from this and other posts (e.g. install snap in appVM etc)

something seems to happen from template at every boot, different snap squashfs get unmounted at every boot (on appVM) so unable to reproduce issue consistently… :exploding_head: tried manually remounting but no better.

-==> bottom line suggest go w/standalone appVM if u need snap w/deb11 in 4.0.4 (maybe works better in 4.1.0 rc) :cowboy_hat_face: