Unable to show File Picker
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 … (மேலும் படிக்க)
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.
- Asus UM425IA Zenbook (AMD Ryzen 7 4700U CPU)
- 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
- 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:
- Fixed by reinstalling Firefox
- Fixed by resetting Firefox
- Fixed with a restart on a Mac
- 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 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"