Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Unable to show File Picker

  • 8 majibu
  • 1 ana tatizo hili
  • 1 view
  • Last reply by Kiki

more options

This was going to be a question about Firefox being unable to display the file picker dialog, but I managed to find a solution that worked for me along the way. Since it was nowhere near the top of Google's results, I thought I'll share my solution in the hopes that this would help someone facing this same issue.

The hardware:

  • Asus UM425IA Zenbook (AMD Ryzen 7 4700U CPU)

Worked in:

  • Ubuntu 20.04 LTS
  • Firefox provided by APT repository
  • Xorg display server

Not working in:

  • Ubuntu 22.04 LTS
  • Firefox 99.0.1 provided by snap
  • Wayland display server
  • File picker worked briefly on fresh install, but something (not sure what) quickly breaks file picker functionality

The symptoms:

  • Firefox stopped being able to open file picker dialogs
  • Right clicking an image and selecting "Save Image As..." does nothing
  • With forms that accept file upload (such as on this post question page "Add images (optional):"), clicking "Browse" does nothing
  • File downloads work correctly when set to "Save files to ..." under Settings, but nothing happens when set to "Always ask you where to save files"
  • No response to "Ctrl + O" open file shortcut

Similar questions and solutions:

Things I tried that did not work:

  • Disabling hardware acceleration
  • Starting with add-ons disabled
  • Troubleshoot mode
  • Clearing startup cache
  • Clearing cookies and site data
  • Clearing history
  • Refreshing Firefox
  • Creating and using a new profile
  • Deleting the `xulstore.json` file from the profile directory
  • Toggling all permissions under Ubuntu Settings > Applications > Firefox to off and then back to on
  • chmod 777 ~/Downloads
  • Disabling native file picker "ui.allow_platform_file_picker = false"

And finally, what fixed it for me was to go into "about:config" and change "widget.use-xdg-desktop-portal.file-picker" from "2" to "0". Credit to this post that clued me in.

I really hope this saves someone else 2 days of hair pulling and I would appreciate advice from someone more knowledgeable than me on:

  • Why this fixed the problem
  • Whether I should be opening a bug report either against Firefox, or Ubuntu
  • Whether I should also be changing "widget.use-xdg-desktop-portal.mime-handler" and "widget.use-xdg-desktop-portal.settings", both are currently set to "2"
This was going to be a question about Firefox being unable to display the file picker dialog, but I managed to find a solution that worked for me along the way. Since it was nowhere near the top of Google's results, I thought I'll share my solution in the hopes that this would help someone facing this same issue. The hardware: * Asus UM425IA Zenbook (AMD Ryzen 7 4700U CPU) Worked in: * Ubuntu 20.04 LTS * Firefox provided by APT repository * Xorg display server Not working in: * Ubuntu 22.04 LTS * Firefox 99.0.1 provided by snap * Wayland display server * File picker worked briefly on fresh install, but something (not sure what) quickly breaks file picker functionality The symptoms: * Firefox stopped being able to open file picker dialogs * Right clicking an image and selecting "Save Image As..." does nothing * With forms that accept file upload (such as on this post question page "Add images (optional):"), clicking "Browse" does nothing * File downloads work correctly when set to "Save files to ..." under Settings, but nothing happens when set to "Always ask you where to save files" * No response to "Ctrl + O" open file shortcut Similar questions and solutions: * [https://support.mozilla.org/en-US/questions/1301319 Fixed by reinstalling Firefox] * [https://support.mozilla.org/bm/questions/1039987 Fixed by resetting Firefox] * [https://support.mozilla.org/gl/questions/1288559 Fixed with a restart on a Mac] * [https://support.mozilla.org/en-US/questions/1350420 Fixed by downgrading to Ubuntu 16.04] Things I tried that did not work: * Disabling hardware acceleration * Starting with add-ons disabled * Troubleshoot mode * Clearing startup cache * Clearing cookies and site data * Clearing history * Refreshing Firefox * Creating and using a new profile * Deleting the `xulstore.json` file from the profile directory * Toggling all permissions under Ubuntu Settings > Applications > Firefox to off and then back to on * chmod 777 ~/Downloads * Disabling native file picker "ui.allow_platform_file_picker = false" And finally, what fixed it for me was to go into "about:config" and '''change "widget.use-xdg-desktop-portal.file-picker" from "2" to "0"'''. Credit to [https://old.reddit.com/r/kde/comments/sd1v2a/tip_set_widgetusexdgdesktopportal_to_true_in/ this post] that clued me in. I really hope this saves someone else 2 days of hair pulling and I would appreciate advice from someone more knowledgeable than me on: * Why this fixed the problem * Whether I should be opening a bug report either against Firefox, or Ubuntu * Whether I should also be changing "widget.use-xdg-desktop-portal.mime-handler" and "widget.use-xdg-desktop-portal.settings", both are currently set to "2"

Chosen solution

Hi James,

Our team indicate that there might be a bug in the Snap or the XDG portal implementation. The value 2 means "use it if it's running under snap or flatpak".

Would you be able to file a bug report (see File a bug report or feature request for Mozilla products) and include what the journal says when you run the following command?

journalctl -f

Thanks!

Read this answer in context 👍 0

All Replies (8)

more options

Good info. You should've compared the snap version of Firefox to the version from Mozilla.

more options

+1 - fixed it for me on Fedora 36 I'm converting over to wayland+sway from X11+i3wm and everything worked fine under i3 but I noticed no upload dialog when trying to add an attachment to an email in gmail.

thank you!

more options

We noticed that a few folks have been experiencing similar issue as well. Thanks for sharing this, James! I wish I can vote your reply as the solution.

more options

I'll try to forward your questions to our team.

more options

Suluhisho teule

Hi James,

Our team indicate that there might be a bug in the Snap or the XDG portal implementation. The value 2 means "use it if it's running under snap or flatpak".

Would you be able to file a bug report (see File a bug report or feature request for Mozilla products) and include what the journal says when you run the following command?

journalctl -f

Thanks!

more options
more options

Kiki said

Hi James, Our team indicate that there might be a bug in the Snap or the XDG portal implementation. The value 2 means "use it if it's running under snap or flatpak". Would you be able to file a bug report (see File a bug report or feature request for Mozilla products) and include what the journal says when you run the following command?
journalctl -f

Thanks!

I've filed a bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=1780526) and included the journalctl log as requested.

more options

James Fu said

I've filed a bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=1780526) and included the journalctl log as requested.

Thank you!