"File exporer" window doesn't open
I want to attach a file and I click on a button (everything works perfectly on Chrome). When I click, in the console I get this error:
(firefox:3264): Gtk-WARNING **: 13:52:46.781: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: L’interface « org.freedesktop.portal.FileChooser » n’existe pas pour l’objet à l’emplacement /org/freedesktop/portal/desktop
Of course, nothing happens when I click.
I have Ubuntu 22.04 and apparently Firefox in installed with snap, and I have this problem since snap is used to install Firefox.
If it's useful:
snap list Nom Version Révision Suivi Éditeur Notes bare 1.0 5 latest/stable canonical✓ base code b3e4e68a 129 latest/stable vscode✓ classic core 16-2.58.3 14946 latest/stable canonical✓ core core18 20230503 2751 latest/stable canonical✓ base core20 20230503 1891 latest/stable canonical✓ base core22 20230503 634 latest/stable canonical✓ base firefox 113.0.2-1 2710 latest/stable mozilla✓ - gnome-3-38-2004 0+git.6f39565 140 latest/stable/… canonical✓ - gnome-42-2204 0+git.587e965 102 latest/stable canonical✓ - gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ - snap-store 41.3-71-g709398e 959 latest/stable/… canonical✓ - snapd 2.59.2 19122 latest/stable canonical✓ snapd snapd-desktop-integration 0.9 83 latest/stable/… canonical✓ -
This message is the last I'm writing before I definitely move to Chrome. I hope I'll get the help I couldn't find on other places (I saw a lot of answers telling to deactivate snap, adding a ppa or some solutions like these).
Όλες οι απαντήσεις (3)
Snap has restrictions when it comes to file access.
You can try Firefox from the official Mozilla server if you currently use a version from the repositories of your Linux distribution to see if it behaves differently.
On Linux this can be an issue with "xdg-desktop-portal" and you may have to install some packages like xdg-desktop-portal and xdg-desktop-portal-gtk. Whether to use gtk portal for the file picker. 0:never 1:always 2:auto (true for flatpak or GTK_USE_PORTAL=1, false otherwise)
- about:config => widget.use-xdg-desktop-portal.file-picker = 0
- https://support.mozilla.org/en-US/search/?product=firefox&w=2&q=%22xdg-desktop-portal%22
cor-el said
Snap has restrictions when it comes to file access. You can try Firefox from the official Mozilla server if you currently use a version from the repositories of your Linux distribution to see if it behaves differently. On Linux this can be an issue with "xdg-desktop-portal" and you may have to install some packages like xdg-desktop-portal and xdg-desktop-portal-gtk. Whether to use gtk portal for the file picker. 0:never 1:always 2:auto (true for flatpak or GTK_USE_PORTAL=1, false otherwise)
- about:config => widget.use-xdg-desktop-portal.file-picker = 0
- https://support.mozilla.org/en-US/search/?product=firefox&w=2&q=%22xdg-desktop-portal%22
Thanks for your answer. Actually I installed everything related to the problem I encountered:
sudo apt update && sudo apt-get install --reinstall xdg-desktop-portal-gnome xdg-desktop-portal-gtk xdg-desktop-portal-tests xdg-desktop-portal
What are you suggesting? That I change the value ("2", for the moment) of the variable to "0"?
I tried to uninstall firefox from snap and install it using the PPA, but for some reason it has updated (I don't know when because I sudo upgraded blindly) using snap. I tried methods indicating how to get rid of snap but for some reason it caused more harm (at some point I couldn't remove firefox from snap...).
The default behaviour for installing firefox on ubuntu 22.04 is snap. I think that's a terrible idea if snap has restrictions. I asked colleagues and the ones who encountered the same problem told me they switched to Chrome because maintaining Firefox usable in Ubuntu required too much effort. I begin to understand why...
DJ Caësar 9114 said
I want to attach a file and I click on a button (everything works perfectly on Chrome). When I click, in the console I get this error:
I would like the steps taken to see if I can replicate the issue, but need help trying to understand what exactly you're doing. Steps to replicate and screenshot please.