Electron Apps and user-dirs.dirs

So I seem to have run across an issue running Electron Applications as snaps on Fedora 32. I can install them and they will open for the initial run, but if I close them they won’t open again. I get no message indicating that anything is wrong, they just don’t open up.

After some trial and error I found that removing the user-dirs.dirs file in ~/snap/%APP/%VERSION/.config/ allows me to reopen the snap without any further problem.

Below is an example of my user-dirs.dirs:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.

Output of snap version:

series  16
fedora  32
kernel  5.7.17-200.fc32.x86_64

Snaps I’ve had this occur in:

Youtube Music Desktop Player

Due to the lack of error messages I’m hitting a brick wall as to why this is happening. I just know what kind of applications it’s happening to and which file is causing the problem.

I’ve replicated this with riot-web on Ubuntu. Something in the startup script is causing an issue, I think. Probably desktop-common.sh.

1 Like

Is this a desktop helper’s thing (desktop-common.sh)?

Kinda. I think it’s a customised variant that electron-builder uses that is based on the desktop helpers that chains the parts of the script that the desktop helper builds instead of combining them into a single file.

Hi, I submitted a PR to try to fix this bug: https://github.com/develar/snap-armhf-electron-template/pull/1