SIGSEGV while calling xdg-open from classic snap of Electron application

Hello everyone,
I have snapped an Electron application with classic confinement, using latest available snapcraft and running in with latest snapd on Ubuntu 16.04.

When I try to open a link or file from the Electron, it causes crash in the launched application. In case it was a web link, the Firefox gets launched and crashes immediately. If Firefox was started before, opening the link doesn’t crash the browser, but works as expected.

Electron should be using directly xdg-open for these tasks: https://github.com/sneakypete81/electron/blob/master/atom/common/platform_util_linux.cc

Thank you,
JonasT

@morphis Any chance you might have a look at this when you have a moment? You have better background than most about the internals of xdg-open and the recent changes around it.

1 Like

@jonast Can you share the crash dump privately with me?

Hello,

Just tried once more in the classic snap, this time on Ubuntu 17.04.

This is what I’ve got in syslog:
Oct 19 02:29:55 ubuntu zeitgeist-datah[2829]: zeitgeist-datahub.vala:210: Error during inserting events: GDBus.Error:org.gnome.zeitgeist.EngineError.InvalidArgument: Incomplete event: interpretation, manifestation and actor are required

Will try again on the original machine to fetch the original crash dump for you.

I have a problem getting any usable crash dump. Will rather produce a dummy Electron based snap using this and let you try it.

Kind regards,
Jonas

Hey, sorry for the slow reply. I was trying to reproduce this and wonder if there is any example snap that I can use to trigger this? Any suggestions welcome.

As far as I am aware this issue is resolved thanks to Snapcraft 2.38 and the improvements it brings when creating classic snaps.

I have upstream confirmation from @jonast that the xdg-open issue he experienced is resolved since building with snapcraft 2.38 and dropping the desktop launcher from the yaml since the wrapper created by snapcraft does the right thing.

We observed several issues with other classic Electron snaps such as Atom and Visual Studio Code. They’ve been rebuilt with snapcraft 2.38 and the desktop launchers dropped. I’m pleased to report this fixed all outstanding issues in those snaps and they are now in the stable channel.

Thanks to @sergiusens and team for all their hard work on these improvements!

@Wimpress Any chance that this issue has returned?

We still have this issue: https://github.com/microsoft/vscode/issues/75579. I hit it in my machine.
There’s more info on https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1838129.

We’re using snapcraft 3.8 to build VS Code.