Starting snap from the after-install notification fails

Bug #1816396 reported by Sebastien Bacher
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-software (Ubuntu)
Fix Released
Medium
Robert Ancell
Bionic
Fix Released
Medium
Robert Ancell
Cosmic
Won't Fix
Medium
Robert Ancell
Disco
Won't Fix
Medium
Robert Ancell
Eoan
Fix Released
Medium
Robert Ancell

Bug Description

[Impact]
The launch button on the notification shown after snaps are installed doesn't work.

[Test Case]
1. Open GNOME Software
2. Select a snap that is not installed
3. Install that snap
4. Switch focus to another application (i.e. so GNOME Software doesn't have focus)

Expected result:
A notification is shown saying the app is installed with a button that launches it.

Observed result:
A notification is shown but the launch button give an error like "no such desktop file: io.snapcraft.vlc-...."

[Regression Potential]
TBD

Changed in gnome-software (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Ken VanDine (ken-vandine) wrote :

I'm seeing the same behavior on cosmic, so not specific to disco.

Feb 18 14:28:23 x230 gnome-software[4674]: no such desktop file: io.snapcraft.vlc-RT9mcUhVsRYrDLG8qnvGiy26NKvv6Qkd

Changed in gnome-software (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in gnome-software (Ubuntu Cosmic):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Robert Ancell (robert-ancell)
summary: - [Disco] starting snap from the after-install notification fails
+ Starting snap from the after-install notification fails
Changed in gnome-software (Ubuntu Bionic):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Robert Ancell (robert-ancell)
Changed in gnome-software (Ubuntu):
status: Confirmed → Triaged
Changed in gnome-software (Ubuntu Bionic):
status: Confirmed → Triaged
Changed in gnome-software (Ubuntu Cosmic):
status: Confirmed → Triaged
description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Not going to be SRUed to cosmic which is neither nor a LTS nor the current stable version

Changed in gnome-software (Ubuntu Cosmic):
status: Triaged → Won't Fix
Changed in gnome-software (Ubuntu Disco):
assignee: nobody → Robert Ancell (robert-ancell)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Robert Ancell (robert-ancell) wrote :

The cause of this is:
1. You install a snap.
2. GNOME Software generates a notification, with a button that will contact the GNOME Software process and perform the action "app.launch" with the app ID. (gs-common.c:gs_app_notify_installed)
3. GNOME Software uses the ID as a desktop ID (i.e. the name of a .desktop file) to launch the application via the GAppInfo object (gs-application.c:launch_activated)

Where this fails is G-S is assuming that the application ID matches the desktop ID. This is best practise for modern XDG compliant apps, but is not enforced.

This assumption always fails in the general case for Snaps, and the ID used is a generated AppStream ID like io.snapcraft.moon-buggy-2kkitQurgOkL3foImG4wDwn9CIANuHlt.

The initial solution was to explicitly pass the desktop ID, but this seemed a bit of a hack an unlikely to be upstreamable. https://gitlab.gnome.org/robert.ancell/gnome-software/tree/notification-launch-desktop-id

The second solution was to continue to pass the ID, but instead to have plugins do the launching, that way the Snap plugin could work out the binary to run. https://gitlab.gnome.org/robert.ancell/gnome-software/tree/notification-launch-plugin

The latter solution turns out to be non-trivial to implement.

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Changed in gnome-software (Ubuntu):
status: Triaged → Fix Committed
Changed in gnome-software (Ubuntu Disco):
status: Triaged → Won't Fix
Changed in gnome-software (Ubuntu Eoan):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.30.6-2ubuntu11

---------------
gnome-software (3.30.6-2ubuntu11) focal; urgency=medium

  * debian/patches/0030-snap-Use-new-banner-media.patch:
    - Use new banner format (LP: #1844799)
  * debian/patches/0031-Use-plugin-API-to-launch-apps-from-install-notificat.patch:
  * debian/patches/0032-snap-Allow-snaps-to-be-shown-by-AppStream-ID.patch:
    - Fix snaps not launchding from the after install notification
      (LP: #1816396)

 -- Robert Ancell <email address hidden> Fri, 01 Nov 2019 16:40:46 +1300

Changed in gnome-software (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-software (Ubuntu Eoan):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in gnome-software (Ubuntu Bionic):
status: Triaged → Fix Committed
Changed in gnome-software (Ubuntu Eoan):
status: Triaged → Fix Committed
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Sebastien, or anyone else affected,

Accepted gnome-software into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-software/3.30.6-2ubuntu10.19.10.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-eoan
tags: added: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Sebastien, or anyone else affected,

Accepted gnome-software into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-software/3.28.1-0ubuntu4.18.04.13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Using gnome-sofware 3.30.6-2ubuntu10.19.10.0 on Ubuntu 19.10 I was able to install moon-buggy and launch it from the notification.

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Using gnome-sofware 3.28.1-0ubuntu4.18.04.13 on Ubuntu 19.10 I was able to install moon-buggy and launch it from the notification.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

That should say "Ubuntu 18.04 LTS"

tags: added: verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.30.6-2ubuntu10.19.10.0

---------------
gnome-software (3.30.6-2ubuntu10.19.10.0) eoan; urgency=medium

  * debian/patches/0030-snap-Use-new-banner-media.patch:
    - Use new banner format (LP: #1844799)
  * debian/patches/0031-Use-plugin-API-to-launch-apps-from-install-notificat.patch:
  * debian/patches/0032-snap-Allow-snaps-to-be-shown-by-AppStream-ID.patch:
    - Fix snaps not launching from the after install notification
      (LP: #1816396)

 -- Robert Ancell <email address hidden> Thu, 14 Nov 2019 14:27:53 +1300

Changed in gnome-software (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-software has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.28.1-0ubuntu4.18.04.14

---------------
gnome-software (3.28.1-0ubuntu4.18.04.14) bionic; urgency=medium

  * debian/patches/0026-shell-search-provider-implement-XUbuntuCancel.patch
    - implement XUbuntuCancel to request pending search cancellation from
      gnome-shell (LP: #1756826)

 -- Marco Trevisan (Treviño) <email address hidden> Thu, 21 Nov 2019 14:06:35 +0100

Changed in gnome-software (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.