Trash portal broken for all Flatpak apps (xdg-desktop-portal 1.20.4 regression)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- linux
- Domain
- operating-systems
Research direction
Start with the installed xdg-desktop-portal version and the upstream regression tracked in issue 1972. Reproduce using the listed flatpak run --command=gio trash command and inspect /usr/lib/xdg-desktop-portal verbose output; done means updating or backporting the fix and confirming that sandboxed apps can move files to trash.
Written by the indexing model from the issue text.
Description
Your system information
- Steam client version: 1788652215
- SteamOS version: 3.8.28
- Opted into Steam client beta?: No
- Opted into SteamOS beta?: No
- Have you checked for updates in Settings > System?: Yes
Please describe your issue in as much detail as possible:
Flatpak apps cannot move files to the trash. Any trash request through the org.freedesktop.portal.Trash portal fails with "Trash portal failed on ". This affects files in /home as well as on the SD card, so it is not filesystem- or permission-specific. Trashing the same files on the host with gio trash works normally.
Running the portal in verbose mode (/usr/lib/xdg-desktop-portal -v -r) logs:
XDP: Handling TrashFile
XDP: Failed trashing file: Failed getting the parent fd
This matches the upstream regression introduced by the fix for GHSA-rqr9-jwwf-wxgj, tracked at: https://github.com/flatpak/xdg-desktop-portal/issues/1972
Affected upstream versions include 1.20.4 and 1.21.1; it is reported fixed in 1.21.2, and distributions such as Ubuntu have backported the fix.
Installed packages:
xdg-desktop-portal 1.20.4-1.1
xdg-desktop-portal-kde 6.4.3-2
glib2 2.84.3-1
Test app runtime: org.gnome.Platform/x86_64/51 (io.github.cboxdoerfer.FSearch)
Steps for reproducing this issue:
- Install any Flatpak app with filesystem access, e.g. io.github.cboxdoerfer.FSearch
- touch ~/testfile
- flatpak run --command=gio io.github.cboxdoerfer.FSearch trash ~/testfile
- Observe "gio: file:///home/deck/testfile: Trash portal failed on /home/deck/testfile"
- Outside the sandbox,
gio trash ~/testfilesucceeds.
Expected: the file is moved to the trash.
Requested fix: update xdg-desktop-portal to a release containing the upstream fix, or backport it to 1.20.x.
- Dominant language
- No language data
- Stars
- 2.6k
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ValveSoftware/SteamOS
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ValveSoftware/SteamOS#2860 ·
-
steam-short-session-tracker: incorrect registry backup path resets settings during automatic repairOpen
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ValveSoftware/SteamOS#2829 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
ValveSoftware/SteamOS#1743 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
ValveSoftware/SteamOS#2863 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ValveSoftware/SteamOS#2862 ·
All issues in ValveSoftware/SteamOS
Similar issues
-
Windows: is_executable returns true for a directory named git.exe (exists() should be is_file())Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
fitzgen/is_executable#24 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mozilla/policy-templates#1348 ·
Maintainers usually reply within 1 day
-
status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
PX4/PX4-Autopilot#28923 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bot-triaged enhancement module: binaries module: windows release triage triaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day