Snap fails to load error minidump.Segmentation fault

I have build a snap installer for one of my app. If I build it locally and install it, the snap works fine but If I push it to the snap store and then download it from there it fails to load. Here are more details on the issue -

https://github.com/zulip/zulip-electron/issues/593

The error I’m getting is -

Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Failed to generate minidump.Segmentation fault (core dumped)

This used to work. The error can be reproduced on Ubuntu 18 and 16.

Is it possible you need to add canberra-gtk-module to stage-packages?

The snap seems buggy. I don’t know enough about it to be of much use, but snap run --strace zulip sees a lot of segfaults (and a lot of trying to open .<some number>_dOeSnotExist_.db all over the place) which might illuminate somebody more knowledgeable.

Interestingly I note you’ve got a snapcraft.yaml in your source tree, but also have snap mentioned in your package.json.

So you may actually be building the snap twice? Electron Builder will be producing a snap thanks to the entry in the package.json and you’re likely running snapcraft manually which is ingesting the unpacked build.

The likely reason it’s segfaulting (I suspect) is because you’ve recently bumped to a newer version of electron? Older releases of electron used gtk2, but the newer ones use gtk3. So this line in your yaml needs changing from desktop-gtk2 to desktop-gtk3 and that should be it.

If you’d used the snap electron-builder made, you wouldn’t see this issue. Electron Builder knows what to do in this case. However you may be using a separate yaml for some other reason, which is fine.

However, I’m somewhat confused that the yaml shows version 2.0.0 yet your store versions are newer. I’m wondering if you really are using that yaml or not?

1 Like

I don’t actually know if that yaml file is being used or not. Can you help me out on this i.e. what should I check/debug in order to get rid of the error? Thanks again for the help.