Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Multiple branches available ­– file save dialog fails to honor filesystem permissions #879

Open
akvadrako opened this issue Sep 8, 2022 · 6 comments
Labels
bug help wanted portal: documents Issues with the documents portal

Comments

@akvadrako
Copy link

I have been trying to debug a weird issue I had with Firefox in flatpak recently. Even when I added directory permissions to my flatpak installation, the GTK file save dialog was returning portal paths (/run/user/1000/doc/.../) instead of the real paths. Eventually I figured out it seemed to be due to having two versions of Firefox installed. When trying to save I got this error message in the system log:

xdg-document-portal[247389]: error: Multiple branches available for org.mozilla.firefox, you must specify one of: org.mozilla.firefox/x86_64/beta, org.mozilla.firefox/x86_64/stable

I am able to access those paths from inside the container without using the portal, and flatpak info --show-permissions gives the expected results. Removing one of the versions of Firefox solves the issue. My understanding is that this should work correctly, so it's a portal bug.

This is on Ubuntu 22.04.1, xdg-desktop-portal 1.14.4, xdg-desktop-portal-gtk 1.14.0.

@GeorgesStavracas
Copy link
Member

Duplicate of #886

@GeorgesStavracas GeorgesStavracas marked this as a duplicate of #886 Dec 12, 2022
@GeorgesStavracas GeorgesStavracas closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
@akvadrako
Copy link
Author

Why do you think this is a duplicate of 886? That isn't about the "multiple branches" message.

@GeorgesStavracas
Copy link
Member

Oops

@akvadrako
Copy link
Author

Thanks. If I can help by providing more information or doing some debugging, let me know.

@GeorgesStavracas GeorgesStavracas moved this to Needs Triage in Triage Oct 2, 2023
@GeorgesStavracas GeorgesStavracas added bug help wanted portal: documents Issues with the documents portal labels Oct 5, 2023
@GeorgesStavracas GeorgesStavracas moved this from Needs Triage to Triaged in Triage Oct 5, 2023
@GeorgesStavracas
Copy link
Member

I can confirm this bug. The problem is that flatpak info needs a specific branch if the app has multiple branches available, but xdg-document-portal doesn't provide that.

@Erick555
Copy link

Erick555 commented Oct 6, 2023

So instead of calling:
flatpak info --file-access=PATH APPID
xdp need to call:
flatpak info --file-access=PATH APPID//BRANCH.

❯ flatpak info --file-access=/usr/share org.mozilla.firefox
error: Multiple branches available for org.mozilla.firefox, you must specify one of: org.mozilla.firefox/x86_64/beta, org.mozilla.firefox/x86_64/stable
❯ flatpak info --file-access=/usr/share org.mozilla.firefox//stable
hidden

The branch name is available in /.flatpak-info under [Instance] section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted portal: documents Issues with the documents portal
Projects
Status: Triaged
Development

No branches or pull requests

3 participants