HTML5 geolocation no longer working in Firefox 48 (Linux)
Hi
I use HTML5 geolocation for some geolocated chatrooms features in my music label's website. It used to work fine, but recently ceased to work, and after firstly thinking that I had a problem in my own code I noticed the 48 upgrade, and I looked a bit around and found http://html5demos.com/geo which also report a failure. Javascript console says error :
this.listener[listenerFunc] is undefined WifiGeoPositionProvider.prototype.notifyListener() NetworkGeolocationProvider.js:544 WifiGeoPositionProvider.prototype.sendLocationRequest() NetworkGeolocationProvider.js:496 WifiGeoPositionProvider.prototype.onChange() NetworkGeolocationProvider.js:403 NetworkGeolocationProvider.js:
As you may test by yourself, the granting dialog shows fine, but once the user accept to share the location, the Javascript error triggers.
Thanks,
N. aka Shangri-l
Chosen solution
Solved in the next version
Read this answer in context 👍 0All Replies (6)
Works for me on Windows 7 on a laptop with the wi-fi radio enabled (screenshot attached). I don't know how it works in Linux, but I would think similarly.
Could you test in Firefox's Safe Mode? In Safe Mode, Firefox temporarily deactivates extensions, hardware acceleration, and some other advanced features to help you assess whether these are causing the problem.
You can restart Firefox in Safe Mode using either:
- "3-bar" menu button > "?" button > Restart with Add-ons Disabled
- Help menu > Restart with Add-ons Disabled
and OK the restart.
A small dialog should appear. Click "Start in Safe Mode" (not Refresh).
Any improvement?
What does this web page say about your location? http://whatismyipaddress.com/ Under the map, look for Location not accurate?
Thank you for the quick replies
Concerning the Safe Mode testings :
Still fails, but in Safe Mode the error that shows now in the JS console is different :
Error: Error retrieving geoip data <anonymous> common-min.80cc97d7f66d.js:10 x.Callbacks/c() common-min.80cc97d7f66d.js:4 x.Callbacks/p.fireWith() common-min.80cc97d7f66d.js:4 k() common-min.80cc97d7f66d.js:5 .send/r() common-min.80cc97d7f66d.js:5 common-min.80cc97d7f66d.js
But you were talking about Wifi enabled... I was thinking that the geolocation could be guessed as a LAN feature through my Internet box even without Wifi ; is it possible that I got this error just because I recently gave up Wifi and am now using an Ethernet cable to connect ? Seems quite strange to me. Actually I just checked and I'm almost sure I noticed the error before I removed my wifi card. I hope I remember correctly, but as far as I know I noticed the problem when a one-day promotional campaign gave my site many visitors on Aug, 08, and I wanted to add my geoloc in our chatrooms when chatting with them. And I removed my wifi card on Aug 12, surely, when I got a new PCI card that required me to free one extra slot.
Actually according to what I understand from the Firefox Geolocation FAQ, FF will use the Google Location Service and fallback to my IP-based location as recorded in various GeoIP databases and wifi shouldn't be an issue. https://www.mozilla.org/en-US/firefox/geolocation/
Concerning FredMcD's answer, the GeoIP database as used by the service you suggested me to test shows correctly, and like it as been usual to me for years, my geoloc at the local DSLAM a few miles away from my town. And when I report an "incorrect" (simply not very accurate, indeed) location, Firefox prompts me to allow location sharing, and when I accept, the website tells there were a problem, it literally says "This page requires you to approve the usage of browser location services."
Thank you for your time and interest,
N.
On desktops and laptops that do not have GPS, Firefox would poll the operating system for wi-fi hotspot data and submit that to Google to compare with its vast database of wi-fi hotspot data to calculate your location. If your computer does not have wi-fi turned on, I think the site has to rely on your IP address.
Actually I think the thing has to do with the fact that my server is HTTP and google now ban non-https geoloc. I'm not sure, but since FF relies on Ggl service this may be the reason.
UPDATE : if I understood correctly, the non-HTTPS ban is a browser-side feature that is Chrome/Chromium specific and should not impact FF. I tested my code in FF over an https connexion and the error is still here, exactly the same : listener is not defined.
Modified
Chosen Solution
Solved in the next version