Closed Bug 654154 Opened 11 years ago Closed 11 years ago

GPSD not being used for Geolocation


(Core :: DOM: Geolocation, defect)

Not set



Tracking Status
firefox5 - ---
firefox6 - fixed
firefox7 --- fixed


(Reporter: Bill, Assigned: dougt)




(Whiteboard: [qa-])


(1 file)

User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

GPS receiver attached to local system.
geo.wifi.uri set to blank (I do NOT want Google's wi-fi based geolocation)
Error console in view
logging.enabled set true for both geo.gpsd and geo.wifi

Output should be the lat/long where the gps receiver is located. Error console should show GPSD log entries in the Messages.

Reproducible: Always

Steps to Reproduce:
1.GPS receiver attached to local system. GPSD is running with gps position set.
2.geo.wifi.uri set to blank (I do NOT want Google's wi-fi based geolocation) set to
4.use either a version of gpsd pre-2.90, or use a version of GPSDGeolocationProvider.js that speaks the current gpsd protocol
5.Error console in view
6.logging.enabled set true for both geo.gpsd and geo.wifi the url

Actual Results:  
No Messages from GPSDGeolocationProvider.js on the error console.
Test html responds with error message instead of lat/lon

Expected Results:  
GPSDGeolocationProvider.js logs many messages on teh Error Console.
Lat/long of the local system

I have tried several things, simply grasping at straws since I am not  FF developer.
- Updated omni.jar to use a version of GPSDGeolocationProvider.js that works under FF3 wit the current version of gpsd. No output difference
- updated the components.manifest to reference GPSDGeolocationProvider.js instead of GPSDGeolocationProvider.manifest. No difference in results.

Bottom line: software that WORKS with FF3 is totally broken in FF4
Component: General → Geolocation
Product: Firefox → Core
QA Contact: general → geolocation
I have a working (under FF3) version of GPSDGeolocationProvider.js if anybody is interested. I just don't know what to do with it to make FF4 work.

Using your attached testcase in Firefox 6.0a1 this works for me.  It displays my location with no errors at all in Error Console.

Please confirm.
With the setting
set to a null address, you SHOULD get an error message out of NetworkGeolocationProvider.js complaining about a bad URI.

In the "Messages" portion of the Error Console, you should see several diagnostics from that same element, all starting with 
   *** WIFI GEO:
with the last being 
   *** WIFI GEO: shutdown called

If, in fact, GPSDGeolocationProvider.js was being invoked, there would be similar messages as well. Since they are missing, GPSDGeolocationProvider.js is not being invoked at ALL!

BTW, this failure is consistent in FF6 as well (Just downloaded and tested.)
Added question: since it is apparent that GPSDGeolocationProvider.js is not being invoked at ALL, perhaps I am simply missing something somewhere that tells Firefox that it should do so. A config item or something?
CCing Doug Turner on this bug since he's the dev expert for Geolocation.
Assignee: nobody → doug.turner
Ever confirmed: true
Attached patch patch v.1Splinter Review
manifest fail.
Attachment #534490 - Flags: review?(blassey.bugs)
Attachment #534490 - Flags: review?(blassey.bugs) → review+
Keywords: checkin-needed
I tried the code that Doug provided. Downloaded the nightly and executed the tests described above. 


I was able to successfully access the GPSD from my FF application. The error console gave me the GPSD GEO log messages as expected, the gps coordinates were properly returned.
not sure if it is possible to make FF5 at this point, but requesting.
Hey there, we're using this flag to track issues that are in code that's new to Firefox 6. Please contact if you have longstanding issues you're concerned about.
Attachment #534490 - Flags: approval-mozilla-aurora?
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
See comment #10, not tracking for 5.
Attachment #534490 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
qa-: QA cannot easily verify this fix.

Bill Lee, can you please verify this is fixed using Firefox 7.0b6?
Whiteboard: [qa-]
A very quick look: it does NOT appear to be working! I will look further and report again.

I'm not sure I have the latest and greatest 7.0 beta. Help->About Firefox says 

Firefox is up to date
You are currently on the beta update channel
O.k., an update: After further investigation, the version of 7.0 beta that is running on my desktop system appears to be correct. I am able to access the gps receiver using the socket interface to gpsd using the GPSDGeolocationProvider

Now the next question. I really want to test his on my laptop (Fedora 14, 64 bit system). I have FF7.0b6 downloaded, but it will NOT START! Get the error "Couldn't load XPCOM." If somebody can tell me how to get past that problem and make the 7.0b6 execute, I could verify the GPSD code there. Until that is accomplished, I have to hesitate to say the code is working.
Did you download the 32-bit or 64-bit Linux build?
I downloaded what was made available at

That site doesn't seem to distinguish between 32 and 64 bit systems.
Can you try with one of these builds:

This will become the new released beta tomorrow.
Can you try with one of these builds:

This will become the new released beta tomorrow.
Anthony, I downloaded the 64-bit version to the laptop and it seems to work just fine.

Fedora 14
Marking VERIFIED based on comment 21
Now that the original issue has been resolved (THANKS!) there remains one question. Not sure if this is the place to ask, so please redirect me if not.

Is there any "clean" way to have geolocation enabled but the wifi (i.e., asking Google for wi-fi based location) disabled?

I have achieved that as I noted in the original bug report above by setting the geo.wifi.uri  to blank. That causes an exception in NetworkGeolocationProvider.js when the URI can't be parsed. But that seems to be a rather clumsy way to turn off the geo.wifi capability.

What I would like to see is a geo.wifi.enabled config item, set to true as default, but if false would disable the NetworkGeolocationProvider. And perhaps the same for GPSDGeolocationProvider: a config item geo.gpsd.enabled true or false.
Please file this in a new bug, setting severity to "enhancement".
Will do. Have done. Thanks for the re-direct.
You need to log in before you can comment on or make changes to this bug.