Failing geoclue breaks Geolocation API without fallback
Categories
(Core :: DOM: Geolocation, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: hans.peyrot, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
Try to access my bank webistes, none work, all demand gelocation to be available.
Got to this website to test geolocation service on firefox: https://mylocation.org/
It does not work.
If I go to my bank websites or mylocation.org with Google Chrome all websites work.
Did a test with firefox --safe-mode
Same result, geolocation does not work.
Tried changing
geo.provider.network.url
To different url providers, none worked.
https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%
https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_LOCATION_SERVICE_API_KEY%
http://ip-api.com/json/?fields=lat,lon,status,message
Actual results:
Access to my bank denied
Result from test on https://mylocation.org/, say test failed
Expected results:
Access to my bank accounts as normal as it was working a month ago
Results from https://mylocation.org/, the latitude an longitude, should be displayed normally as in Chrome
Comment 2•7 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•7 months ago
|
Comment 3•7 months ago
|
||
Hello hanspr, thanks for reporting. Which Linux distribution is this about?
Hi,
Linux distribution
Linux Mint 21.3
Cinnamon 6.0.4
Comment 6•7 months ago
|
||
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
So I guess this is different from bug 1904291? Linux Mint is debian based and we do have official package for debian, so this should be something different...
This might be unnecessary, but I created a virtual machine and ran the live CD from latest Linux Mint release. And did the same test with https://mylocation.org
And the problem is there too.
Just wanted to confirm that I did not have any profile or installation errors in my own machine.
I also created a clean new profile in my machine and the error is the same.
Comment 8•7 months ago
|
||
Can you open devtools, type navigator.geolocation.getCurrentPosition(console.log, console.error)
, allow the permission, and see what happens?
Comment 9•7 months ago
|
||
And if possible, can you follow the .deb package installation steps and see if the same thing happens there? https://support.mozilla.org/en-US/kb/install-firefox-linux#w_install-firefox-deb-package-for-debian-based-distributions
Comment 11•7 months ago
•
|
||
(In reply to hanspr from comment #10)
Created attachment 9410243 [details]
Selección_001.pngIt returns "undefined"
And does it not log anything else even if you wait for several seconds?
Reporter | ||
Comment 12•7 months ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #11)
(In reply to hanspr from comment #10)
Created attachment 9410243 [details]
Selección_001.pngIt returns "undefined"
And does it not log anything else even if you wait for several seconds?
Waited for a full 2 minutes and no other message was shown.
I'm creating a new vm to test the debian package install
Comment 13•7 months ago
•
|
||
(In reply to hanspr from comment #12)
Waited for a full 2 minutes and no other message was shown.
Then this is definitely nothing to do with bug 1904291, as that one logged failure. And also, does your machine has GPS or is this about IP based geolocation? (about:support doesn't seem to have info about whether any sensor exists)
I'm creating a new vm to test the debian package install
Thank you!
Reporter | ||
Comment 14•7 months ago
|
||
Fresh Mint VM machine, removed firefox.
Followed instructions to install debian package from mozilla
Same results
Does not work on : https://mylocation.org
Ran test on console "navigator.gelocation....."
Same result : undefined
Reporter | ||
Comment 15•7 months ago
|
||
Fresh Debian 12 VM machine
Used the debian 12 original firefox installed
Does not work on : https://mylocation.org
Ran test on console "navigator.gelocation....."
Same result : undefined
Reporter | ||
Comment 16•7 months ago
|
||
You should be able to reproduce the error, it happens in all distributions with fresh installs.
Reporter | ||
Comment 17•7 months ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #13)
(In reply to hanspr from comment #12)
Waited for a full 2 minutes and no other message was shown.
Then this is definitely nothing to do with bug 1904291, as that one logged failure. And also, does your machine has GPS or is this about IP based geolocation? (about:support doesn't seem to have info about whether any sensor exists)
I'm creating a new vm to test the debian package install
Thank you!
Forgot to answer: IP based I do not have a GPS
Comment 18•7 months ago
|
||
Thank you! I'll check further on next Monday 👍
Comment 19•7 months ago
|
||
It's geoclue, disabling geo.provider.use_geoclue
and restarting the browser fixes the issue. We need some fallback.
Comment 20•7 months ago
|
||
Amin, while it's not related to Snap, you might want to be posted on that
Updated•7 months ago
|
Reporter | ||
Comment 21•7 months ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #19)
It's geoclue, disabling
geo.provider.use_geoclue
and restarting the browser fixes the issue. We need some fallback.
Confirmed that changing geo.provider.use_geoclue to false fixes the issue.
Should I close this report, as solved ?
Comment 22•7 months ago
|
||
We should consider
- disabling this pref by default until geoclue fixes it
- figuring out how to properly fall back
So I'd like to keep this open.
Comment 23•7 months ago
|
||
Hello
I am the reporter of https://bugzilla.mozilla.org/show_bug.cgi?id=1904291
openSUSE Tumbleweed
here are the details of geo keys in about:support :
Clé du service de localisation de Google Manquante (not found)
Clé de Google Safebrowsing Présente (found)
Clé du service de localisation de Mozilla Présente (found)
Yes, for some years Firefox by default used geoclue.
If I understand well, geoclue uses MLS for geo ip location.
And MLS has definitively closed since 2024/06/12.
See
https://www.omgubuntu.co.uk/2024/03/mozilla-location-services-axed
https://news.ycombinator.com/item?id=39724505
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2959
Mozilla Location Service shutting down June 12
https://gitlab.freedesktop.org/geoclue/geoclue/-/issues/186#top
In my case, disabling the use of geoclue does not solve the problem because openSUSE does not supply any Google api key.
Comment 24•7 months ago
|
||
Hi again, promeneur!
Yup, the openSUSE problem won't be solved by dealing with geoclue error. We are going to add a way to fall back from geoclue to GLS as an immediate action, and then further investigate what we can do for distributions without GLS access.
Comment 25•7 months ago
|
||
GLS is Google location service, right ?
In the past I was able to get a key just by downloading the bz2 version of Firefox then copying the G API key from this version.
There is no more G API key in this downloaded version of Firefox. Why ?
Any way, it's not normal that Linux does not get its own location service. Today it is a basic service as time-servers.
Comment 26•7 months ago
|
||
Any way, it's not normal that Linux does not get its own location service. Today it is a basic service as time-servers.
The plan is to use geoclue, and fall back to GLS only if we don't get a response in time, fwiw.
Comment 27•7 months ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #26)
The plan is to use geoclue,
but this is the case for some years
and fall back to GLS only if we don't get a response in time, fwiw.
geoclue uses MLS and MLS is closed. The next version of geoclue will use no more MLS then you never get any response.
The default behavior is already the use of GLS which fails in case of openSUSE.
Also, if you use a gps usb device geoclue can't connect to it or can't use gpsd.
Geoclue project does not evolve for many years. There is a lack of developers. You can't rely on this project. Is there any other project ?
Linux geolocation is in a poor state. I think this is now a Linux foundation problem or perhaps an upstream problem, a governmental problem to supply a geo ip (cellular, Ethernet, wifi) service as it supply GPS service.
Comment 28•7 months ago
|
||
Bug 1905717 seems like about the best we can do.
Updated•7 months ago
|
Comment 29•7 months ago
|
||
Mathew, did you mean to mark this bug as fixed? I've reverted it to be a duplicate of bug 1905717 because the fix for bug 1905717 addressed the problem. Marking it as fixed can be confusing because there's no record of this bug being addressed in the version history.
Description
•