Closed Bug 1780526 Opened 5 months ago Closed 5 months ago

Unable to show File Picker under Ubuntu 22.04 (Firefox snap)

Categories

(Firefox Build System :: Third Party Packaging, defect)

Firefox 104
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: james, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Steps to reproduce:

Fresh install of Ubuntu 22.04 LTS, Wayland DE (also affect Xorg), Firefox as provided by default via snap. Affects at least Firefox versions 99.0.1 up to the current version.

File picker works briefly on fresh install, but something (not sure what) quickly breaks file picker functionality.

For example, nothing happens when:

  • Right clicking an image and selecting "Save Image As...".
  • Clicking "Browse" button on forms that accept file upload.
  • Clicking downloadable hyperlinks when "Downloads" setting set to "Always ask you where to save files". (Works correctly when set to "Save files to ...".)
  • Using "Ctrl + O" open file shortcut.

Was able to resolve this issue by changing "widget.use-xdg-desktop-portal.file-picker" from "2" to "0". Was advised by Kiki to file a bug report with journalctl log after sharing my issue and solution here: https://support.mozilla.org/en-US/questions/1375244

Actual results:

Nothing happens.

Expected results:

File picker should open in response to the various actions stated above.

It was also suggested that installing xdg-desktop-portal-gtk would resolve the problem here: https://www.reddit.com/r/firefox/comments/uc81pb/couldnt_download_anything/

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

(In reply to james from comment #1)

It was also suggested that installing xdg-desktop-portal-gtk would resolve the problem here: https://www.reddit.com/r/firefox/comments/uc81pb/couldnt_download_anything/

Did it work? Can you check the journal when you try to download / save anything and see if there's anything interesting there?

Blocks: snap
Flags: needinfo?(james)

Sounds a lot like bug 1749771 ...

Jul 21 16:27:23 UM425IA firefox[353281]: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files

Clearly, this is something missing on your system, like xdg-desktop-portal ...

/usr/libexec/xdg-desktop-portal -rv as well as /usr/libexec/xdg-desktop-portal-gtk -rv and share those logs as well

I think the journal log already includes the right hint

firefox[353281]: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files

D'oh, I missed the attachment.

Flags: needinfo?(james)

Yeah, this seems like a system misconfiguration to me...

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

(In reply to james from comment #1)

It was also suggested that installing xdg-desktop-portal-gtk would resolve the problem here: https://www.reddit.com/r/firefox/comments/uc81pb/couldnt_download_anything/

Did it work? Can you check the journal when you try to download / save anything and see if there's anything interesting there?

Installing xdg-desktop-portal-gtk did resolve the issue. journalctl -f most notably no longer shows firefox[353281]: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files.

(In reply to Alexandre LISSY :gerard-majax from comment #5)

Jul 21 16:27:23 UM425IA firefox[353281]: Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.portal.Desktop was not provided by any .service files

Clearly, this is something missing on your system, like xdg-desktop-portal ...

/usr/libexec/xdg-desktop-portal -rv as well as /usr/libexec/xdg-desktop-portal-gtk -rv and share those logs as well

$ /usr/libexec/xdg-desktop-portal -rv
XDP: load portals from /usr/share/xdg-desktop-portal/portals
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-shell.portal
XDP: portal implementation for gnome
XDP: portal implementation supports org.freedesktop.impl.portal.Access
XDP: loading /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal
XDP: portal implementation for gnome
XDP: portal implementation supports org.freedesktop.impl.portal.Secret
XDP: providing portal org.freedesktop.portal.MemoryMonitor
XDP: providing portal org.freedesktop.portal.PowerProfileMonitor
XDP: providing portal org.freedesktop.portal.NetworkMonitor
XDP: providing portal org.freedesktop.portal.ProxyResolver
XDP: providing portal org.freedesktop.portal.Trash
XDP: providing portal org.freedesktop.portal.GameMode
XDP: providing portal org.freedesktop.portal.Realtime

** (/usr/libexec/xdg-desktop-portal:16225): WARNING **: 18:53:39.674: No skeleton to export
XDP: Using gnome-shell.portal for org.freedesktop.impl.portal.Access in GNOME
XDP: providing portal org.freedesktop.portal.Device
XDP: providing portal org.freedesktop.portal.WebExtensions
XDP: providing portal org.freedesktop.portal.Location
XDP: providing portal org.freedesktop.portal.Camera
XDP: Using gnome-keyring.portal for org.freedesktop.impl.portal.Secret in GNOME
XDP: providing portal org.freedesktop.portal.Secret
XDP: org.freedesktop.portal.Desktop acquired

No additional output as I right-click, "Save Link As...".

$ /usr/libexec/xdg-desktop-portal-gtk -rv
bash: /usr/libexec/xdg-desktop-portal-gtk: No such file or directory

Olivier, can we make sure that the relevant desktop portal is installed by Ubuntu? We've received multiple reports of this issue.

Flags: needinfo?(olivier)
Status: UNCONFIRMED → RESOLVED
Closed: 5 months ago
Resolution: --- → INVALID

To be clear, the issue begins within a day of freshly installing Ubuntu 22.04 LTS (I've tried it a couple of times). This is the Firefox snap that comes preinstalled with Ubuntu. In that time, I would've installed some applications like Signal messenger, Spotify, Dropbox, Tutanota, Seafile, etc. Nothing out of the ordinary, and definitely not manually removing xdg-desktop-portal-gtk.

Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

(In reply to james from comment #12)

To be clear, the issue begins within a day of freshly installing Ubuntu 22.04 LTS (I've tried it a couple of times). This is the Firefox snap that comes preinstalled with Ubuntu. In that time, I would've installed some applications like Signal messenger, Spotify, Dropbox, Tutanota, Seafile, etc. Nothing out of the ordinary, and definitely not manually removing xdg-desktop-portal-gtk.

Still, it's a bug on Ubuntu side, not Firefox or the Firefox Snap.

Status: UNCONFIRMED → RESOLVED
Closed: 5 months ago5 months ago
Resolution: --- → INVALID
Component: Widget: Gtk → Third Party Packaging
Product: Core → Firefox Build System

(In reply to Alexandre LISSY :gerard-majax from comment #13)

(In reply to james from comment #12)

To be clear, the issue begins within a day of freshly installing Ubuntu 22.04 LTS (I've tried it a couple of times). This is the Firefox snap that comes preinstalled with Ubuntu. In that time, I would've installed some applications like Signal messenger, Spotify, Dropbox, Tutanota, Seafile, etc. Nothing out of the ordinary, and definitely not manually removing xdg-desktop-portal-gtk.

Still, it's a bug on Ubuntu side, not Firefox or the Firefox Snap.

Got it. My comment was not in response to your status change or challenging it. I set it back to unconfirmed by accident. :)

(In reply to james from comment #14)

(In reply to Alexandre LISSY :gerard-majax from comment #13)

(In reply to james from comment #12)

To be clear, the issue begins within a day of freshly installing Ubuntu 22.04 LTS (I've tried it a couple of times). This is the Firefox snap that comes preinstalled with Ubuntu. In that time, I would've installed some applications like Signal messenger, Spotify, Dropbox, Tutanota, Seafile, etc. Nothing out of the ordinary, and definitely not manually removing xdg-desktop-portal-gtk.

Still, it's a bug on Ubuntu side, not Firefox or the Firefox Snap.

Got it. My comment was not in response to your status change or challenging it. I set it back to unconfirmed by accident. :)

If you followed the default installer, it's really curious.

$ aptitude why xdg-desktop-portal
i   ubuntu-desktop-minimal                 Dépend gnome-shell-extension-desktop-icons-ng
i A gnome-shell-extension-desktop-icons-ng Dépend xdg-desktop-portal
$ aptitude why xdg-desktop-portal-gnome
i   ubuntu-desktop Recommande xdg-desktop-portal-gnome

Maybe having a look at /var/log/dpkg* ? I dont know where the installer might put other infos. Worth having a bug filed at Ubuntu (I've already pinged Olivier on IRC for that as well).

James, can you share the output of:

zgrep -n xdg-desktop-portal /var/log/apt/*

Thanks!

Flags: needinfo?(olivier) → needinfo?(james)

It contains entries from when I manually (un)installed xdg-desktop-portal-gtk to see if it fixes the issue, but here it is.

Unfortunately, this happens on my production laptop, and I'm not in a position to perform yet another clean install to try and figure out where xdg-desktop-portal got b0rked.

Flags: needinfo?(james)

Looks like the installation of libfuse2:amd64 was responsible to removing xdg-desktop-portal-*?

Relevant excerpt from history.log.3:

Start-Date: 2022-04-25  16:18:21
Commandline: apt install fuse libfuse2
Requested-By: jamesfu (1000)
Install: libfuse2:amd64 (2.9.9-5ubuntu3), fuse:amd64 (2.9.9-5ubuntu3)
Remove: ntfs-3g:amd64 (1:2021.8.22-3ubuntu1), xdg-desktop-portal-gtk:amd64 (1.14.0-1build1), xdg-desktop>
End-Date: 2022-04-25  16:18:43
You need to log in before you can comment on or make changes to this bug.