Closed Bug 1009688 Opened 10 years ago Closed 10 years ago

Geolocation fails because the @mozilla.org/wifi/monitor;1 is undefined

Categories

(Core :: DOM: Geolocation, defect)

29 Branch
All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32
Tracking Status
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: marco, Assigned: marcosc)

Details

(Whiteboard: [mentor=jdm][lang=js][good first bug])

Attachments

(2 files, 1 obsolete file)

This is the error I see in the error console:
Cc['@mozilla.org/wifi/monitor;1'] is undefined
Version: Trunk → 29 Branch
Is this a mozilla.org build or a distro build?
(In reply to Josh Matthews [:jdm] from comment #1)
> Is this a mozilla.org build or a distro build?

It is a distro build.
Which distro? I suspect this bug will be more usefully filed in another tracker.
(In reply to Josh Matthews [:jdm] from comment #3)
> Which distro? I suspect this bug will be more usefully filed in another
> tracker.

Fedora 20.
I'm facing the same problem with Firefox 29.0.1 and Fedora 20 x86_64.

You can find the same bug at Redhat Bugzilla (responsible for Fedora Distribution): https://bugzilla.redhat.com/show_bug.cgi?id=1063739

Maybe somebody from Mozilla could help us, to identify the problem?
This is due to missing API key for Google geolocation API:
https://www.googleapis.com/geolocation/v1/geolocate?key=no-google-api-key
We need to specify --with-google-api-keyfile=file build option but we don't have the secret file for obvious reason.
(In reply to Jan Horak from comment #7)
> We need to specify --with-google-api-keyfile=file build option but we don't
> have the secret file for obvious reason.

So it can't/won't be fixed?
The geolocation key is separate from the specific error that's being described here. Obviously geolocation won't work regardless, but conflating the two is unhelpful.
We just require a null check when accessing this.wifiService in http://mxr.mozilla.org/mozilla-central/source/dom/system/NetworkGeolocationProvider.js#127 . That will stop the error that's being logged in the console as described in this bug. The actual geolocation request will continue to fail silently because of the missing key, which can be obtained by applying to Google: https://developers.google.com/maps/documentation/geocoding/index#api_key
Whiteboard: [mentor=jdm][lang=js][good first bug]
(In reply to Marcos Caceres [:marcosc] from comment #11)
> Created attachment 8428911 [details] [diff] [review]
> Make sure Cc["@mozilla.org/wifi/monitor;1"] returns something

Do you want this patch to be reviewed?
(In reply to Josh Matthews [:jdm] from comment #10)
> The actual geolocation request will continue to fail silently
> because of the missing key, which can be obtained by applying to Google:
> https://developers.google.com/maps/documentation/geocoding/index#api_key

Maybe they could use the Mozilla location services?
(In reply to Marco Castelluccio [:marco] from comment #12)
> (In reply to Marcos Caceres [:marcosc] from comment #11)
> > Created attachment 8428911 [details] [diff] [review]
> > Make sure Cc["@mozilla.org/wifi/monitor;1"] returns something
> 
> Do you want this patch to be reviewed?

Setting the review flag helps!
Attachment #8428911 - Flags: review+
@jdm, ok, now what happens? ^_^
You upload a patch which has an author header and a commit message, then set the checkin-needed keyword (along with a recent successful try push link), or someone else with commit access pushes the patch.
Attached patch geo.patchSplinter Review
Added the author and subject to the patch to conform with hg. Will figure out the try server stuff next week.
Attachment #8428911 - Attachment is obsolete: true
Attached patch geo.patchSplinter Review
Improved the commit message. I missed in the notes that there is a convention for commit messages used in this project.
This is simple enough that it doesn't require a try push.

https://hg.mozilla.org/integration/mozilla-inbound/rev/52204412c79b
https://hg.mozilla.org/mozilla-central/rev/52204412c79b
Assignee: nobody → mcaceres
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: