Closed Bug 1905224 Opened 7 months ago Closed 7 months ago

Failing geoclue breaks Geolocation API without fallback

Categories

(Core :: DOM: Geolocation, defect)

Firefox 127
defect

Tracking

()

RESOLVED DUPLICATE of bug 1905717
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: hans.peyrot, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

Attached image ff_safemode.gif

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

Attached image ggchrome.gif

Google Chrome works on same test

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.

Component: Untriaged → Networking
Product: Firefox → Core
Component: Networking → DOM: Geolocation

Hello hanspr, thanks for reporting. Which Linux distribution is this about?

Flags: needinfo?(hans.peyrot)

Hi,

Linux distribution

Linux Mint 21.3
Cinnamon 6.0.4

Flags: needinfo?(hans.peyrot)
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.

Can you open devtools, type navigator.geolocation.getCurrentPosition(console.log, console.error), allow the permission, and see what happens?

Flags: needinfo?(hans.peyrot)

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

Attached image Selección_001.png

It returns "undefined"

Flags: needinfo?(hans.peyrot)

(In reply to hanspr from comment #10)

Created attachment 9410243 [details]
Selección_001.png

It returns "undefined"

And does it not log anything else even if you wait for several seconds?

(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.png

It 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

(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!

Attached image test mint degin install

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

Attached image debian 12 fresh install

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

You should be able to reproduce the error, it happens in all distributions with fresh installs.

(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

Thank you! I'll check further on next Monday 👍

Flags: needinfo?(krosylight)

It's geoclue, disabling geo.provider.use_geoclue and restarting the browser fixes the issue. We need some fallback.

Flags: needinfo?(krosylight)
Summary: geolocation not working → Failing geoclue breaks Geolocation API without fallback

Amin, while it's not related to Snap, you might want to be posted on that

Flags: needinfo?(bandali)
Status: UNCONFIRMED → NEW
Ever confirmed: true

(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 ?

We should consider

  1. disabling this pref by default until geoclue fixes it
  2. figuring out how to properly fall back

So I'd like to keep this open.

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.

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.

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.

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.

(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.

Bug 1905717 seems like about the best we can do.

Status: NEW → RESOLVED
Closed: 7 months ago
Duplicate of bug: 1905717
Resolution: --- → DUPLICATE
No longer duplicate of bug: 1905717
Resolution: DUPLICATE → FIXED
Target Milestone: --- → 129 Branch

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.

Duplicate of bug: 1905717
Resolution: FIXED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: