Closed Bug 702107 Opened 8 years ago Closed 8 years ago

Geolocation Service broken because of access token

Categories

(Core :: DOM: Geolocation, defect)

9 Branch
x86
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11
Tracking Status
firefox9 --- fixed
firefox10 --- fixed

People

(Reporter: rldhont, Assigned: rldhont)

References

Details

(Keywords: regression, Whiteboard: [mozfr][qa?])

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:9.0a2) Gecko/20111026 Firefox/9.0a2
Build ID: 20111026042018

Steps to reproduce:

I call geolocation Service to an url with a token stored in prefs.


Actual results:

Error : access_token is not defined
Source File : resource:///components/NetworkGeolocationProvider.js
Line : 206


Expected results:

No error, access_token has to be accessToken on line 206.

The code is
204: let accessToken = this.getAccessTokenForURL(providerUrlBase);
205: if (accessToken !== "")
206:   providerUrl = providerUrl + "&access_token="+access_token;

The code has to be
204: let accessToken = this.getAccessTokenForURL(providerUrlBase);
205: if (accessToken !== "")
206:   providerUrl = providerUrl + "&access_token="+accessToken;
Depends on: 677256
Keywords: regression
Attached patch patch v.1 (obsolete) — Splinter Review
patch as described.
Assignee: nobody → doug.turner
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #574242 - Flags: review?(doug.turner)
René-Luc, thanks!  can you verify that this patch I attached is exactly what you meant in comment #0
You're welcome.
Doug Turner, I verifying the patch and correct it.
Attachment #574274 - Flags: review?(doug.turner)
Attachment #574274 - Flags: approval-mozilla-beta?
Comment on attachment 574242 [details] [diff] [review]
patch v.1

accesstoken != accessToken
Attachment #574242 - Flags: review?(doug.turner) → review-
Attachment #574274 - Flags: review?(doug.turner) → review+
Keywords: checkin-needed
Attachment #574242 - Attachment is obsolete: true
Comment on attachment 574274 [details] [diff] [review]
patch v.1 correction

[Triage comment]
Approving for Beta since this breaks the geolocation service. Please land today to make it into our next beta release.

Please also make sure to set approval‑mozilla‑aurora? if this is not in 10 Aurora already.
Attachment #574274 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Has this landed for the 9.0b2 candidate builds? Geolocation is still broken for me.

Provided that the issue that I'm observing is what this bug relates to. I set "geo.wifi.uri" to "file:///.../location.json" which contains something like this:

{"location": {
              "latitude": 123.45, 
              "longitude": 12.34, 
              "accuracy": 10.0}}

However, unlike versions up to 8.0, 9.0 and higher don't find this location.
Comment on attachment 574274 [details] [diff] [review]
patch v.1 correction

This hasn't landed anywhere yet as far as I can tell.
Attachment #574274 - Flags: approval-mozilla-aurora?
In my queue with a few other bits that are being sent to try first and then onto inbound.

https://tbpl.mozilla.org/?tree=Try&rev=329bc2d383a3 
(this changeset is there, just was pushed to try previously, so have to view parent)

René-Luc, to save time for future patches (this one is fine for now), could you set your hgrc to include the author automatically, along the lines of:
http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed

Thanks :-)
Assignee: doug.turner → rldhont
Status: NEW → ASSIGNED
Keywords: checkin-needed
Whiteboard: [mozfr]
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a55d64f56ef
Flags: in-testsuite?
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/3a55d64f56ef
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
My location.json is still being ignored (using the 2011-11-21 Nightly).

(as you may have noticed, the location used in my example in Comment 6 is not my real location and a latitude of 123.45 does not make much sense)

Is there any other explanation why my location.json gets ignored starting with Firefox 9.0? Should I open a new bug report?
Comment on attachment 574274 [details] [diff] [review]
patch v.1 correction

[triage comment]
Approved for aurora as well!
Attachment #574274 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Markus Popp, Geolocation schema has changed :
{
  "status": "OK",
  "accuracy": 150.0,
  "location": {
    "lat": -33.85702,
    "lng": 151.21494
  },
  "access_token": "quijibo"
}
take a look has the new NetworkGeolocationProvider.js
http://mxr.mozilla.org/mozilla-central/source/dom/system/NetworkGeolocationProvider.js
(In reply to René-Luc from comment #14)
> Markus Popp, Geolocation schema has changed :
> {
>   "status": "OK",
>   "accuracy": 150.0,
>   "location": {
>     "lat": -33.85702,
>     "lng": 151.21494
>   },
>   "access_token": "quijibo"
> }
> take a look has the new NetworkGeolocationProvider.js
> http://mxr.mozilla.org/mozilla-central/source/dom/system/
> NetworkGeolocationProvider.js

Thank you very much! This did the trick.
Whiteboard: [mozfr] → [mozfr][qa+]
What is the test case and steps to verify this fix? I assume it means adding something to about:config and going to a site like google maps to verify location. Could someone please clarify what needs to be done? Thanks
Whiteboard: [mozfr][qa+] → [mozfr][qa?]
I asked juan becerra  to add litmus tests for this.  He should be able to help.
(Clearing to stop this request showing up on the 'My Requests' page)
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.