"Unknown error acquiring position" returned by navigator.geolocation.getCurrentPosition()
Categories
(Core :: DOM: Geolocation, defect, P5)
Tracking
()
People
(Reporter: david+bugs, Unassigned)
References
(Regression)
Details
(Keywords: regression)
A couple of versions of Firefox back (probably around Firefox 70), all web sites suddenly stopped being able to access my location. Upon investigating, it appears that navigator.geolocation.getCurrentPosition() is returning an error code of 2 (POSITION_UNAVAILABLE) with error message “Unknown error acquiring position”. I was unable to find where further information about this error might be available. Nothing is printed on the standard error or browser console log, so I don't know where to start gathering additional information.
Since there is no way Firefox can guess my position by itself, my geo.wifi.uri preference is correctly set to a URL (http://localhost/location.json) containing a JSON file with my position. Not so long ago it worked like a charm. Now that URL isn't even loaded. Has this preference's name been changed? If so, what is the current correct recommended way to hard-code the computer's location?
Comment 1•5 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1589618 landed recently
but https://bugzilla.mozilla.org/show_bug.cgi?id=1613627 is probably more relevant.
Perhaps Dale can hint which pref to use now.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Hey. So you caught this in a time of flux, "geo.provider-country.network.url" is the new pref @ https://searchfox.org/mozilla-central/source/modules/libpref/init/all.js#3993, however in https://bugzilla.mozilla.org/show_bug.cgi?id=1627538 this is possibly renaming again, will ask if its a good idea to migrate the pref values over.
I dont know about the POSITION_UNAVAILABLE problem however, sorry
Updated•4 years ago
|
FWIW I experience the same issue on FF 77 – all geolocation requests would fail. Setting geo.provider.network.url to use the Mozilla location API with a known-good key resolved the issue. Might this be something like a repeat of bug 1232995?
Updated•3 years ago
|
It is still happening.
This temporary solution from StackOverflow works, but it should be fixed on Mozilla itself: https://stackoverflow.com/a/61032116/3333549
Description
•