Snapd 2.28 xdg-open doesn't work for Electron applications

I was pleased to see that xdg-open capability is now included in snapd 2.28. However, using Ubuntu 17.10 without snapd-xdg-open installed clicking URIs appears to do nothing in Electron applications. So far I tested Visual Studio Code, Discord, irccloud, Atom, Wire and one that is embargoed. The following is logged to stdout when a link is clicked:

Error org.freedesktop.DBus.Error.ServiceUnknown: The name io.snapcraft.Launcher was not provided by any .service files
Error org.freedesktop.DBus.Error.ServiceUnknown: The name com.canonical.SafeLauncher was not provided by any .service files

If snapd-xdg-open is installed then links open again.

This issue does not appear to affect Qt and GTK applications.

If you install the deb package of snapd 2.28.4 from -proposed, does that fix the issue? If so, we miss to install the .services file in the right place for the re-exec case.

1 Like

I’ve installed 2.28.4 from -proposed, and after a reboot, it is working correctly. Thanks!

@mvo Any idea when snapd 2.28.4 will be SRU’d to all supported releases? I have an ISV that is blocked on this issue.

@Wimpress The SRU is uploaded to all ubuntu release, should be available shortly in -proposed and hopefully soon in -updates. However we will look into fixing this issue (the missing .service file) in a 2.28.5 release to ensure it works correctly for people who just use the re-execed core.

1 Like

@Wimpress this should be fixed with

We pushed a new core to the beta channel that should fix this error. In the re-exec case of snapd we did not generate the right dbus service file.

could you put on someone’s to-do list a task for writing a regression test for this to prevent it happening in the future? xdg-open is fairly crucial for desktop apps and the cross-distro support.