ubuntu / snapcraft-desktop-helpers

Various launchers for snapcraft wiki parts
MIT License
73 stars 60 forks source link

Snaps can fail to launch when ~/snap/<snapname>/current/.config/user-dirs.dirs contains symlinks #202

Open zyga opened 4 years ago

zyga commented 4 years ago

For a few months, I've had a puzzling bug open against the official IRCCloud Desktop snap (https://github.com/irccloud/irccloud-desktop/issues/147). After I ran into the issue in another snap, I think that it might be a broader bug in snapd or snapcraft.

In brief: Per the original bug, I can launch IRC Cloud once, but if I close the app, I can't relaunch it. There are no error messages -- the application simply fails to launch. After some troubleshooting with both the IRCCloud snap and the Facebook Messenger port snap, which also exhibits the bug, I think the root cause may have something to do with symlinks.

One of the first things I do when I set up a new Linux machine is to install Dropbox and replace the Documents, Music, Pictures and Videos folders in my users' home dir with symlnks to corresponding directories in my $HOME/Dropbox folder. For example, $HOME/Documents is a symbolic link to $HOME/Dropbox/Documents.

If I edit $HOME/irccloud/17/.config/user-dirs.dirs to comment out the directories that I know to be a symlink, I can launch my snap. I don't know whether this is because the user-dirs.md45sum is not accurately accounting for the symlinks, or whether there's some other check that is failing. But that simple edit does seem to resolve the issue -- modulo me not having tested an functionality in the snap related to getting at files in those dirs!

This bug is a clone of https://bugs.launchpad.net/snapd/+bug/1861174

pengale commented 4 years ago

Thanks for filing the bug here, @zyga. Added to my watched list just in case people have questions for me ...