Electron-builder produces freezing snaps

So as a casual observation, it’s funny how this doesn’t work

/snap/mattermost-desktop/current/opt/Mattermost/mattermost-desktop --no-sandbox

Why is it funny? Well aside from the fact it basically skips the entirety of the snap sandboxing (and the snap mount namespacing, environment variables, etc but that’s not particularly relevant to the casual observation), it actually has the same error with /dev/shm.

And, just to prove this isn’t a case of “maybe all Electron apps behave like this”, well, try sudo snap install joplin-desktop and then do /snap/joplin-desktop/current/linux-unpacked/joplin --no-sandbox. It actually works.

Curiouser still, try dropping the --disable-sandbox flag.

/snap/mattermost-desktop/current/opt/Mattermost/mattermost-desktop

It actually works.

It’s the presence of the --no-sandbox flag that’s causing problems, not necessarily the snap sandboxing in general (as much that using the priviledged extras of the browser-support interface allows you to drop --no-sandbox).

Given also that the main Node process continues to function, you can use the AppIndicator tray icon, and even open new windows and try make those windows browse websites (causing more errors, but it does actually respond), all from an out of process debug console, I’m suspicious this isn’t actually snap causing the problems, and it’s actually something in Node/Electron itself. It’s literally only the render process having issues.

Edit:

It’s reproducible with the AppImage

wget https://releases.mattermost.com/desktop/4.7.2/mattermost-desktop-4.7.2-linux-x86_64.AppImage
chmod +x mattermost-desktop-4.7.2-linux-x86_64.AppImage 
./mattermost-desktop-4.7.2-linux-x86_64.AppImage --no-sandbox