Broken background portal autostart in 1.14.3

Bug #1975638 reported by Vincent Chernin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-desktop-portal (Ubuntu)
Fix Released
Low
Unassigned
Jammy
Fix Released
Low
Sebastien Bacher

Bug Description

- Impact

With 1.14.3 the background portal creates a broken autostart file (it sends an incorrectly quoted app ID to implementations). This means apps like EasyEffects or Pika Backup cannot rely on the background portal to create a working autostart file. Please update to xdg-desktop-portal 1.14.4 https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.14.4 which fixes this issue.

- Test Case

1. Install ASHPD Demo https://flathub.org/apps/details/com.belmoussaoui.ashpd.demo from Flathub

2. Within the app make a background portal request with auto start enabled (you must accept the prompt from GNOME Shell)

3. Note the contents of ~/.config/autostart/com.belmoussaoui.ashpd.demo.desktop is a desktop file, however the exec key’s value has an app id with quotes, making it invalid.

4. After logging out and in or restarting, the app will not already be running, even though it previously asked the portal API for it to be auto started.

The same steps can be repeated with EasyEffects from Flathub instead of ASHPD Demo, note the EasyEffects switch is named "Start Service at Login" within EasyEffects' preferences menu.

When the bug is fixed, the created desktop file for auto start is valid and the app will start after login.

- Regression potential

The update is a new minor version including the fix for that bug and translation updates (which are going to be imported by launchpad but not part of the deb on Ubuntu)

The codepath change is specific to flatpak commandline parsing so check that flatpaks still start correctly

description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Could you provide more detailed steps of how to trigger the issue and the impact which we could as a testcase to do a stable update?

Changed in xdg-desktop-portal (Ubuntu):
status: New → Incomplete
Revision history for this message
Vincent Chernin (vchernin) wrote (last edit ):

On 22.04:

1. Install ASHPD Demo https://flathub.org/apps/details/com.belmoussaoui.ashpd.demo from Flathub

2. Within the app make a background portal request with auto start enabled (you must accept the prompt from GNOME Shell)

3. Note the contents of ~/.config/autostart/com.belmoussaoui.ashpd.demo.desktop is a desktop file, however the exec key’s value has an app id with quotes, making it invalid.

4. After logging out and in or restarting, the app will not already be running, even though it previously asked the portal API for it to be auto started.

The same steps can be repeated with EasyEffects from Flathub instead of ASHPD Demo, note the EasyEffects switch is named "Start Service at Login" within EasyEffects' preferences menu.

When the bug is fixed, the created desktop file for auto start is valid and the app will start after login.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, the new version is merged in https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal/1.14.4-1ubuntu1 and we will also SRU that update to the LTS

Changed in xdg-desktop-portal (Ubuntu):
importance: Undecided → Low
status: Incomplete → Fix Committed
description: updated
description: updated
Jeremy Bícha (jbicha)
Changed in xdg-desktop-portal (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → Low
Revision history for this message
Chris Halse Rogers (raof) wrote :

I'm a little confused. The changelog entry for the SRU includes:
+...
+xdg-desktop-portal (1.14.3-0ubuntu3) kinetic; urgency=medium
+
+ * Update the native messaging portal patch to pick up a new commit
+ - debian/patches/webextensions-portal.patch
+
+ -- Olivier Tilloy <email address hidden> Wed, 11 May 2022 11:06:32 +0200
+...

But there are no changes to any files in debian/ in the upload, and the only functional change appears to be a 10 line patch to src/xdp-utils.c?

Revision history for this message
Sebastien Bacher (seb128) wrote :

@Chris, thanks for the review. That fix was already SRUed as 1.14.3-0ubuntu2.22.04.1. I can do another upload deleting the kinetic entry if that's better for you

Revision history for this message
Chris Halse Rogers (raof) wrote :

Ooof. Sorry for not getting back to you sooner.

Yeah, the changelog for SRUs should be against the version currently in -updates, as it's user-facing. Ping me once you upload with a fixed changelog and I'll accept.

Revision history for this message
Chris Halse Rogers (raof) wrote :

(To be clear: just the top changelog entry would be good; users aren't interested in merges from Debian ☺)

Revision history for this message
Chris Halse Rogers (raof) wrote : Proposed package upload rejected

An upload of xdg-desktop-portal to jammy-proposed has been rejected from the upload queue for the following reason: "Please re-upload with a fixed changelog. Sorry for the delay. Thanks!".

Revision history for this message
Sebastien Bacher (seb128) wrote :

Reuploaded

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in xdg-desktop-portal (Ubuntu Jammy):
assignee: nobody → Sebastien Bacher (seb128)
Changed in xdg-desktop-portal (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Vincent, 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.4-1ubuntu1~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
Vincent Chernin (vchernin) wrote :

> 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.

Package 1.14.4-1ubuntu1~22.04.1 from jammy-proposed fixes the bug, following the test case from above. I don’t seem to be able to change the tag to verification-done-jammy.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for testing!

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

This bug was fixed in the package xdg-desktop-portal - 1.14.4-1ubuntu1~22.04.1

---------------
xdg-desktop-portal (1.14.4-1ubuntu1~22.04.1) jammy; urgency=medium

  * New stable update
    - background: Fix a regression introduced in 1.14.0 which caused invalid
      autostart files to be generated. (lp: #1975638)

 -- Sebastien Bacher <email address hidden> Mon, 13 Jun 2022 16:09:30 +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.

Revision history for this message
Mantas Kriaučiūnas (mantas) wrote :

It seems bug #2018440 (No such interface “org.freedesktop.portal.Background”) is a duplicate, right?

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.