Last Comment Bug 654154 - GPSD not being used for Geolocation
: GPSD not being used for Geolocation
Product: Core
Classification: Components
Component: Geolocation (show other bugs)
: unspecified
: x86 Linux
: -- major (vote)
: mozilla7
Assigned To: Doug Turner (:dougt)
: Andrew Overholt [:overholt]
Depends on:
  Show dependency treegraph
Reported: 2011-05-02 10:15 PDT by Bill Lee
Modified: 2011-09-29 09:04 PDT (History)
9 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch v.1 (679 bytes, patch)
2011-05-23 11:09 PDT, Doug Turner (:dougt)
blassey.bugs: review+
jpr: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Bill Lee 2011-05-02 10:15:14 PDT
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
Comment 1 Bill Lee 2011-05-02 13:16:17 PDT
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.

Comment 2 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-05-10 15:44:13 PDT
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.
Comment 3 Bill Lee 2011-05-11 05:48:02 PDT
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.)
Comment 4 Bill Lee 2011-05-11 05:49:24 PDT
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?
Comment 5 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-05-11 09:23:34 PDT
CCing Doug Turner on this bug since he's the dev expert for Geolocation.
Comment 6 Doug Turner (:dougt) 2011-05-23 11:09:06 PDT
Created attachment 534490 [details] [diff] [review]
patch v.1

manifest fail.
Comment 7 Doug Turner (:dougt) 2011-05-23 11:40:55 PDT
pushed to try:
Comment 8 Bill Lee 2011-05-23 14:23:04 PDT
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.
Comment 9 Doug Turner (:dougt) 2011-05-23 15:41:28 PDT
not sure if it is possible to make FF5 at this point, but requesting.
Comment 10 Robert Sayre 2011-05-24 14:42:46 PDT
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.
Comment 11 Doug Turner (:dougt) 2011-05-24 18:10:11 PDT
Comment 12 JP Rosevear [:jpr] 2011-05-25 11:44:53 PDT
See comment #10, not tracking for 5.
Comment 14 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-22 13:41:05 PDT
qa-: QA cannot easily verify this fix.

Bill Lee, can you please verify this is fixed using Firefox 7.0b6?
Comment 15 Bill Lee 2011-09-28 11:49:46 PDT
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
Comment 16 Bill Lee 2011-09-28 13:48:18 PDT
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.
Comment 17 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-28 13:49:53 PDT
Did you download the 32-bit or 64-bit Linux build?
Comment 18 Bill Lee 2011-09-28 14:02:24 PDT
I downloaded what was made available at

That site doesn't seem to distinguish between 32 and 64 bit systems.
Comment 19 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-28 14:04:42 PDT
Can you try with one of these builds:

This will become the new released beta tomorrow.
Comment 20 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-28 14:04:58 PDT
Can you try with one of these builds:

This will become the new released beta tomorrow.
Comment 21 Bill Lee 2011-09-28 18:02:54 PDT
Anthony, I downloaded the 64-bit version to the laptop and it seems to work just fine.

Fedora 14
Comment 22 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-29 07:51:45 PDT
Marking VERIFIED based on comment 21
Comment 23 Bill Lee 2011-09-29 08:19:03 PDT
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.
Comment 24 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-09-29 08:36:41 PDT
Please file this in a new bug, setting severity to "enhancement".
Comment 25 Bill Lee 2011-09-29 09:04:57 PDT
Will do. Have done. Thanks for the re-direct.

Note You need to log in before you can comment on or make changes to this bug.