SRU 1.14.3-0ubuntu3 to jammy

Bug #1973596 reported by Olivier Tilloy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
Fix Released
Medium
Olivier Tilloy
Jammy
Fix Released
Medium
Olivier Tilloy

Bug Description

[Impact]

When testing native messaging support with the firefox snap (not yet released, see https://github.com/flatpak/xdg-desktop-portal/pull/705), gnome-shell won't prompt the user for permission to authorize a given extension to access the portal, because the app id being passed to the authorization request isn't what gnome-shell expects. This is https://github.com/flatpak/xdg-desktop-portal/issues/769.

As a consequence, access is always denied, and native messaging just doesn't work.

The patch that fixes this issue was discussed with the author of the native messaging portal (James Henstridge) and approved by him, and is now being cherry-picked here.

[Test Plan]

On jammy, fetch and install the latest test snap from https://launchpad.net/~osomon/+snap/firefox-native-messaging (manual installation requires the --dangerous flag).
Install the chrome-gnome-shell native connector (`sudo apt install chrome-gnome-shell`).
Open firefox and browse to https://addons.mozilla.org/firefox/addon/gnome-shell-integration/.
Click the "Add to Firefox" button on the page.
Accept the authorization request that appears as a popup to install the GNOME Shell integration extension.
Browse to https://extensions.gnome.org/local/.

You should be getting a GNOME Shell modal dialog that prompts you whether to allow Firefox to make use of the WebExtensions portal to launch the org.gnome.chrome_gnome_shell native connector.
Without this patch, GNOME Shell silently rejects the authorization request, and you won't see any prompt.

Note that if you've tested the functionality before installing the patched version of xdg-desktop-portal, you'll need to delete the database that stores the permissions on disk (~/.local/share/flatpak/db/webextensions) and restart the portal.

[Where problems could occur]

This patch affects a portal that is not being used anywhere yet (the implementation in the Firefox snap is work in progress and serves as a proof of concept). So there is no risk of affecting existing functionality or other portals.

At worst, the patch doesn't fix the issue it claims it resolves.

Olivier Tilloy (osomon)
Changed in xdg-desktop-portal (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
status: New → Fix Released
Changed in xdg-desktop-portal (Ubuntu Jammy):
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
Olivier Tilloy (osomon)
Changed in xdg-desktop-portal (Ubuntu Jammy):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Olivier, or anyone else affected,

Accepted xdg-desktop-portal into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xdg-desktop-portal/1.14.3-0ubuntu2.22.04.1 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, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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.

Changed in xdg-desktop-portal (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Olivier Tilloy (osomon) wrote :

Successfully tested by executing the test plan in the description in a fully up-to-date jammy VM:

 - installed the native messaging portal-enabled firefox snap
 - installed the chrome-gnome-shell native connector
 - installed the gnome shell integration extension in firefox
 - browsed to https://extensions.gnome.org/local/
 - observed that I'm not getting prompted for authorization, and that the extension complains that the connector cannot be talked to

 - enabled jammy-proposed, upgraded xdg-desktop-portal to version 1.14.3-0ubuntu2.22.04.1
 - deleted ~/.local/share/flatpak/db/webextensions
 - restarted the VM
 - opened firefox and browsed to https://extensions.gnome.org/local/
 - observed that I'm now getting prompted for authorization

After granting the authorization, communication with the native connector initially fails, and won't work until the portal is killed and restarted. This is a separate issue that has been reported (https://github.com/flatpak/xdg-desktop-portal/pull/705#issuecomment-1123392120) and is being investigated.
The problem that this SRU addresses (lack of authorization prompt) is indeed fixed.

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

This bug was fixed in the package xdg-desktop-portal - 1.14.3-0ubuntu2.22.04.1

---------------
xdg-desktop-portal (1.14.3-0ubuntu2.22.04.1) jammy; urgency=medium

  * Update the native messaging portal patch to pick up a new commit
    (LP: #1973596)
    - debian/patches/webextensions-portal.patch

 -- Olivier Tilloy <email address hidden> Mon, 16 May 2022 12:36:11 +0200

Changed in xdg-desktop-portal (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for xdg-desktop-portal 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.

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.