[flatpak/snap] Navigating to localhost:port causes Firefox to ask to choose an application
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
People
(Reporter: yoasif, Assigned: jhorak)
References
Details
Attachments
(3 files)
From https://www.reddit.com/r/firefox/comments/j5l0ll/why_cant_firefox_open_ports_normally_why_does/
Note: I cannot reproduce this on GNOME or XFCE on Ubuntu, or in Windows.
Steps to reproduce:
- Download KDE Neon user edition https://neon.kde.org/download
- Start KDE Neon in a VM
- Open Firefox
- Navigate to localhost:8000
What happens:
Firefox asks user to choose an application to launch "localhost" links.
Expected result:
Firefox should try to resolve the entered query as http://localhost:8000 and fail.
[Tracking Requested - why for this release]:
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
It seems that the KDE is setting GTK_USE_PORTAL=1
environment variable to use KDE native dialogs. This is intended to be used only for Flatpak because Firefox cannot get list of supported applications installed on the system the System handler just accepts all schemes just in case the system has a support for it. It's rather dumb, but I don't know how to handle it better ATM. Not using system handler would make the magnet: telegram: etc schemes fail to open.
Try to run Firefox with export GTK_USE_PORTAL=0
. But it might be reset by the launch script.
Assignee | ||
Comment 4•4 years ago
|
||
Btw I've filled this feature request for the portal: https://github.com/flatpak/xdg-desktop-portal-gtk/issues/330
Assignee | ||
Comment 5•4 years ago
|
||
We need to disable current scheme handling under flatpak because it expects
there's system handler for all schemes (which is wrong for example for 'localhost')
until there's a flatpak portal which provides if system has a handler for specific
scheme.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
Comment 8•4 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Updated•4 years ago
|
Comment 11•4 years ago
|
||
Alternatively, could you treat "localhost:port" as a special case and automatically treat it as though it is automatically destined for Firefox without looping through the OS's registered protocol handler, so that it does not flow through to xdg-open at all?
I acknowledge this is an assumption without any research, but surely nobody types in localhost:9090 into Firefox and expects another completely different application to pop-up
I would suggest that completely disabling all protocol handlers in Firefox-in-flatpak was an overly broad solution, causing https://bugzilla.mozilla.org/show_bug.cgi?id=1688966 , and hopefully we can come up with a focused alternative
Assignee | ||
Comment 12•4 years ago
|
||
[comment for wrong bug]
Comment 13•4 years ago
|
||
Backed out in 85.0.1 for causing bug 1688966.
Comment 14•4 years ago
|
||
Landing the backout in 87 as well due to that regression
https://hg.mozilla.org/integration/autoland/rev/68c881bd1ac0
Updated•4 years ago
|
Updated•4 years ago
|
Comment 15•4 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:jhorak, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 16•4 years ago
|
||
The patch landed and had to be backed out.
Comment 17•3 years ago
|
||
Experiencing this on Manjaro's stable/testing/unstable branches, and Arch, without using the Firefox Flatpak/Snap.
Comment 18•3 years ago
|
||
I can say that I also have not done research but I am absolutely blown away every single time Firefox asks me what I want to do with "localhost:8384". Further, isn't basically every distro shipping with XDK Portals configured correctly, thus meaning this affects nearly every Linux user? ...
Comment 19•3 years ago
|
||
What do you
Comment 20•3 years ago
|
||
Comment 21•3 years ago
|
||
Comment 22•3 years ago
|
||
bugherder |
Description
•