Last Comment Bug 702107 - Geolocation Service broken because of access token
: Geolocation Service broken because of access token
Status: RESOLVED FIXED
[mozfr][qa?]
: regression
Product: Core
Classification: Components
Component: Geolocation (show other bugs)
: 9 Branch
: x86 Linux
: -- normal (vote)
: mozilla11
Assigned To: René-Luc
:
Mentors:
Depends on: 677256
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-13 03:47 PST by René-Luc
Modified: 2012-09-14 03:08 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed


Attachments
patch v.1 (1002 bytes, patch)
2011-11-14 00:12 PST, Doug Turner (:dougt)
josh: review-
Details | Diff | Splinter Review
patch v.1 correction (1002 bytes, patch)
2011-11-14 03:42 PST, René-Luc
dougt: review+
christian: approval‑mozilla‑aurora+
akeybl: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description René-Luc 2011-11-13 03:47:55 PST
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;
Comment 1 Doug Turner (:dougt) 2011-11-14 00:12:17 PST
Created attachment 574242 [details] [diff] [review]
patch v.1

patch as described.
Comment 2 Doug Turner (:dougt) 2011-11-14 00:13:03 PST
René-Luc, thanks!  can you verify that this patch I attached is exactly what you meant in comment #0
Comment 3 René-Luc 2011-11-14 03:42:26 PST
Created attachment 574274 [details] [diff] [review]
patch v.1 correction

You're welcome.
Doug Turner, I verifying the patch and correct it.
Comment 4 Josh Matthews [:jdm] 2011-11-14 09:17:10 PST
Comment on attachment 574242 [details] [diff] [review]
patch v.1

accesstoken != accessToken
Comment 5 Alex Keybl [:akeybl] 2011-11-15 12:01:51 PST
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.
Comment 6 Markus Popp 2011-11-16 11:51:50 PST
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 7 Josh Matthews [:jdm] 2011-11-19 11:26:26 PST
Comment on attachment 574274 [details] [diff] [review]
patch v.1 correction

This hasn't landed anywhere yet as far as I can tell.
Comment 8 Ed Morley [:emorley] 2011-11-19 18:23:41 PST
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 :-)
Comment 10 Ed Morley [:emorley] 2011-11-20 14:19:49 PST
https://hg.mozilla.org/mozilla-central/rev/3a55d64f56ef
Comment 11 Markus Popp 2011-11-21 11:05:34 PST
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 12 christian 2011-11-21 11:06:05 PST
Comment on attachment 574274 [details] [diff] [review]
patch v.1 correction

[triage comment]
Approved for aurora as well!
Comment 13 Matt Brubeck (:mbrubeck) 2011-11-21 12:22:37 PST
https://hg.mozilla.org/releases/mozilla-aurora/rev/36975a40a443
Comment 14 René-Luc 2011-11-21 13:18:14 PST
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
Comment 15 Markus Popp 2011-11-21 14:21:55 PST
(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.
Comment 17 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-12-09 07:04:04 PST
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
Comment 18 Doug Turner (:dougt) 2011-12-09 08:47:02 PST
I asked juan becerra  to add litmus tests for this.  He should be able to help.
Comment 19 Ed Morley [:emorley] 2012-09-14 03:08:00 PDT
(Clearing to stop this request showing up on the 'My Requests' page)

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