Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Geolocation not working on latest Firefox

  • 20 replies
  • 8 have this problem
  • 8947 views
  • Last reply by q390671

more options

I have the latest stable FIrefox (as today) and I've tried on Linux and Windows with all addons and plugins disabled and also in safe mode and it doesn't get my geolocation. The website has "HTTPS". I clicked "allow and remember", delete cache completely and nothing. I tried all the solutions from answers I could find but still doesn't work. Any help would be appreciated. Thanks!

Chosen solution

I looked into this a little more, and it seems that if Firefox cannot retrieve your nearby wi-fi hotspot names, it should at least send your IP address to get a more approximate location. (Location-Aware Browsing FAQ)

The address of this service is listed in about:config (with a missing parameter filled in by the code). You can check here:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste geo and pause while the list is filtered

(3) If the geo.wifi.uri preference is bolded and "modified" or "user set", you can right-click > Reset it to the default (mine is https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_API_KEY%)

(4) As an alternative to the default value for geo.wifi.url you can use https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY% (according to Geolocation is still not working!)

If Firefox sends anything to the geolocation service, the address should appear in the Browser Console (you may need to click the "Net" button to un-filter request URLs). For example:

Default address: 08:39:50.874 POST XHR https://www.googleapis.com/geolocation/v1/geolocate [HTTP/2.0 200 OK 343ms]

Alternate address: 08:49:21.994 POST XHR https://location.services.mozilla.com/v1/geolocate [HTTP/1.1 200 OK 920ms]

Read this answer in context 👍 2

All Replies (20)

more options

What does this web page say about your location? http://whatismyipaddress.com/ Under the map, look for Location not accurate?

more options

FredMcD said

What does this web page say about your location? http://whatismyipaddress.com/ Under the map, look for Location not accurate?

It shows a location... it's pretty accurate to where I am. Why?

more options

q390671 said

it doesn't get my geolocation

I wanted to see if the GPS was working.

https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save

Note: Some software, like Advanced SystemCare with Surfing Protection, can protect files in the Firefox profile folder against changes. If you have such software then check the settings or uninstall this software.

more options

FredMcD said

q390671 said
it doesn't get my geolocation

I wanted to see if the GPS was working.

https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save

Note: Some software, like Advanced SystemCare with Surfing Protection, can protect files in the Firefox profile folder against changes. If you have such software then check the settings or uninstall this software.

Thanks for your help, but honestly I don't know what to do with that information. In my about:config I have geolocation enabed.

more options

Go to the webpage. Once the page is loading, mouse to the address bar and Left click the icon. A window for displaying site information should come up. Now select Permissions. In the menu, find the plugin, and set it to Never or Ask. This action will only effect that one site.

more options

Thanks again for the reponse, but I'm afraid I'm kinda confused. What plugin are you talking about? Geolocation? If so... I already have it on "always allow".

more options

Does Firefox show you the permission prompt on sites you haven't given permission to before? Note that the default is "Ask" in that case. For example, this demo:

https://developer.mozilla.org/docs/Web/API/Geolocation/Using_geolocation#Live_Result

I have attached a screenshot of what I would expect when you click the button.

Also, to check that "Allow and Remember" worked, when you're on that site, click the padlock icon to drop down the site information panel. All customized permissions should be listed on that panel. If it doesn't mention location, you can check the Permissions panel of the Page Info dialog.

You can call that up using any of these:

  • right-click a blank area of the page and choose View Page Info > Permissions
  • (menu bar) Tools menu > Page Info > Permissions
  • click the padlock or "i" icon to the left of the site address, then the ">" icon, then More Information > Permissions

Near the top, you'll find "Access Your Location" and you can uncheck the "Use default" box and select the permission you prefer.

If this gets lost between Firefox sessions, make sure Firefox is not set to clear history when it closes, or if that is set, go into the Settings for that feature and uncheck Site Preferences.

more options

Hey there. Ok, so I that site when I click show location I get the prompt to allow or not. I click allow and my location won't show up. Several times. Then I click "remember" and "always" and no location is shown. And when I click on padlock to see the permissions it's not saved there. I don't know why the first webiste that the other user posted here showed my location and this doesn't?

more options

q390671 said

I click allow and my location won't show up. Several times. Then I click "remember" and "always" and no location is shown. And when I click on padlock to see the permissions it's not saved there.

Maybe Firefox is not capable of obtaining more specific information?

On Windows, what the geolocation permission allows is for Firefox to ask Windows for your nearby wi-fi hotspot name (SSIDs), which are then sent to Google to check against its massive database built through Street View and presumably Android devices.

I don't know how it works on Linux, sorry.

I don't know why the first webiste that the other user posted here showed my location and this doesn't?

Sites that do not ask for permission generally just look up your IP address in a variety of databases, and that should return information registered by your internet service provider, usually at the city or county level. It's not precise unless a database has other information to make it more specific.

more options

So we can confirm that geolocation isn't working. Is there any other way to fix it?

more options

I think it would make sense to look for errors in the Browser Console. That opens as a separate window which collects errors information from all open tabs. You can open it from the Developer menu or Ctrl+Shift+j.

If you click the trash can in the upper left corner, that helps reduce clutter. Then in Firefox, try the button to get your location and see if any new messages appear in the console.

more options

Using the location example from the developer link I get this: 21:43:01.010 TypeError: parentDocShell.getDocShellEnumerator is not a function 1 tab.js:62:23

more options

Hmm, if you hover your mouse over tab.js, does it show an internal address starting with chrome:// (could be part of Firefox or a legacy extension) or with moz-extension:// (part of a newer extension based on WebExtensions API)?

more options

None of those. Starts with something like resourse/devtools

more options

Oh, okay, that seems to be an error related to the developer tools rather than the page. Or maybe there's a connection that I'm not understanding, since it doesn't sound related to geolocation. ???

more options

So is there anything that I could do?

On another note... when I click on "get my geolocation" on the website that I'm trying to use now that I've learned the console thing I can see two lines that says "error loading" and these two links. And my CPU goes crazy as hell, up to 100% until I close the tab. https://connect.facebook.net/en_US/fbevents.js https://connect.facebook.net/en_US/sdk.js

more options

I'm sorry I don't know how it works on Linux; hopefully a Linux person will be able to generate some further suggestions.

Regarding the inability to load the scripts from FB, do you use any privacy/tracking blockers? Those may block that domain. However, that wouldn't explain the extreme CPU use.

more options

No, like I said I disabled all the addons and plugins also tried safe mode.

Regarding using Linux... like I said I also tried on Windows and it's the same.

more options

Chosen Solution

I looked into this a little more, and it seems that if Firefox cannot retrieve your nearby wi-fi hotspot names, it should at least send your IP address to get a more approximate location. (Location-Aware Browsing FAQ)

The address of this service is listed in about:config (with a missing parameter filled in by the code). You can check here:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful or accepting the risk.

(2) In the search box above the list, type or paste geo and pause while the list is filtered

(3) If the geo.wifi.uri preference is bolded and "modified" or "user set", you can right-click > Reset it to the default (mine is https://www.googleapis.com/geolocation/v1/geolocate?key=%GOOGLE_API_KEY%)

(4) As an alternative to the default value for geo.wifi.url you can use https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY% (according to Geolocation is still not working!)

If Firefox sends anything to the geolocation service, the address should appear in the Browser Console (you may need to click the "Net" button to un-filter request URLs). For example:

Default address: 08:39:50.874 POST XHR https://www.googleapis.com/geolocation/v1/geolocate [HTTP/2.0 200 OK 343ms]

Alternate address: 08:49:21.994 POST XHR https://location.services.mozilla.com/v1/geolocate [HTTP/1.1 200 OK 920ms]

Modified by jscher2000

more options

Returning to default geo.wifi.uri solved the problem. I remember when installing FF I delete everything that has "google" in it.

I'd like to try the other option instead of google. But that one worked. Thanks!