Closed
Bug 989720
Opened 12 years ago
Closed 12 years ago
Geolocation not working and shows mock location
Categories
(Firefox Build System :: General, defect)
Tracking
(blocking-b2g:1.3T+, b2g-v1.3T fixed, b2g-v1.4 fixed, b2g-v2.0 fixed)
People
(Reporter: gerard-majax, Assigned: dougt)
References
Details
(Keywords: regression)
Attachments
(3 files)
|
855 bytes,
patch
|
mmc
:
review-
|
Details | Diff | Splinter Review |
|
515.32 KB,
text/plain
|
Details | |
|
547 bytes,
patch
|
mmc
:
review+
|
Details | Diff | Splinter Review |
On current gecko running on Desire Z and Nexus S, when using Geolocation, I'm always getting a mock location based in Paris.
Logcat shows:
I/Gecko ( 1194): *** injecting location
I/Gecko ( 1194): *** lat: 48.860000
I/Gecko ( 1194): *** lon: 2.350000
I/Gecko ( 1194): *** accuracy: 40000.000000
E/GeckoConsole( 1194): [JavaScript Error: "formatURL: Couldn't find value for key: MOZ_MOZILLA_API_KEY" {file: "jar:file:///system/b2g/omni.ja!/components/nsURLFormatter.js" line: 118}]
If WiFi is disabled, you can run into bug 989719.
STR:
0. Open HERE Maps
1. Allow location
Expected:
Current location is found
Actual:
Fake location is found
Comment 1•12 years ago
|
||
Probably a regression from bug 977448.
Leaving qawanted here to either confirm this on Buri 1.4 or Tarako 1.3T.
| Assignee | ||
Comment 2•12 years ago
|
||
Not a mock location -- this is a location provided by MLS. Sometimes MLS is wrong. You can help my stumbling your area.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
| Assignee | ||
Comment 3•12 years ago
|
||
lets leave this open until I get more data from reporter. :)
Assignee: nobody → dougt
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
| Reporter | ||
Comment 4•12 years ago
|
||
So there is probably something else broken. But this is a first patch to fix the JS error reported. With this one, however, I still get a wrong location. Looking at the code, I see |#ifdef DEBUG_GPS| which is wrong, at least.
Attachment #8399142 -
Flags: review?(dougt)
| Reporter | ||
Comment 5•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #3)
> lets leave this open until I get more data from reporter. :)
I tried the DEBUG_GPS = 5, but without any luck. Maybe it's because of my hackish device. I'll have to try on another.
Still, some things I don't get:
- geo.provider.use_mls is defined at false in b2g/app/b2g.js, and I did not enabled it by hand
- reverting bug 977725 does not help
- there is clearly no low level gps request being sent at all on my Desire Z, but I see some on my Nexus S
- on Nexus S, I see correct location but I still see Paris location being injected
I'll have to bisect.
| Assignee | ||
Comment 6•12 years ago
|
||
Comment on attachment 8399142 [details] [diff] [review]
Fixing the JS error
Review of attachment 8399142 [details] [diff] [review]:
-----------------------------------------------------------------
Why is this a problem? Safe-browsing and Geolocation on desktop work fine as this is.
| Assignee | ||
Comment 7•12 years ago
|
||
agps is probably not configured correctly on either the Desire Z and Nexus. Please send me your gps.conf and the log when debug is set to 5.
| Reporter | ||
Comment 8•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #6)
> Comment on attachment 8399142 [details] [diff] [review]
> Fixing the JS error
>
> Review of attachment 8399142 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Why is this a problem? Safe-browsing and Geolocation on desktop work fine
> as this is.
This patch fixes the JS error reported in logcat:
E/GeckoConsole( 1194): [JavaScript Error: "formatURL: Couldn't find value for key: MOZ_MOZILLA_API_KEY" {file: "jar:file:///system/b2g/omni.ja!/components/nsURLFormatter.js" line: 118}]
| Reporter | ||
Comment 9•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #7)
> agps is probably not configured correctly on either the Desire Z and Nexus.
> Please send me your gps.conf and the log when debug is set to 5.
You don't think there is an issue if both geolocations sources are reporting values that different ?
After more investigation, I suspect the Desire Z issue is not related. But on Nexus S, what I'm observing is that as I said, I'm getting a fix very close to my real from one source with good accuracy value, and then a couple of seconds after, I'm getting a fix located 250km away with an accuracy of 40km.
Flags: needinfo?(dougt)
| Reporter | ||
Comment 10•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #7)
> agps is probably not configured correctly on either the Desire Z and Nexus.
> Please send me your gps.conf and the log when debug is set to 5.
Oh, and I don't know if there is anything wrong with A-GPS at all. On my Nexus S (let's focus on this one, it exposes calls to the gps_init() correctly), the sequence of events is:
- gps is initialized, logcat shows .so's init messages
- a first fix comes after one second, exposing call to InjectLocation, which seems to be the intended behavior
- this first fix is located on Paris, accuracy of 40km
- 5-10 secs after, a new fix arrives, located on my current location, with an accuracy of 50-100m
- then sometimes, I get the Paris fix being re-injected (logcat exposes the debug message)
- then a couple of seconds after, I get the correct fix again.
It does not seems like DEBUG_GPS has any impact on my device, but I can investigate by hacking NMEA and Satellites View callback in Gecko, if needed.
Comment 11•12 years ago
|
||
Blocked to test it on Buri device, no Geo-location is found when open Here Maps app bug 984812
1.4 Environmental Variables:
Device: Buri 1.4 MOZ
BuildID: 20140331000202
Gaia: 4c3b2f57f4229c5f36f0d8fd399e65f4db88f104
Gecko: 3aaca223b673
Version: 30.0a2
Firmware Version: v1.2-device.cfg
Keywords: qawanted
Comment 12•12 years ago
|
||
(In reply to sarsenyev from comment #11)
> Blocked to test it on Buri device, no Geo-location is found when open Here
> Maps app bug 984812
This isn't right. You need to have a SIM on your device & be outdoors to get geolocation to work.
Keywords: qawanted
Comment 13•12 years ago
|
||
On 1.5 Geolocation is founded correctly when Wi_Fi is on, see bug 989719 when WiFi is diabled
Also I followed steps in comment 9 (SIM card inserted and outdoor), but Geo-location doesn't work on 1.4 and 1.3,the error message notifies "Can't find your location"
Added a logcat
1.5 Environmental Variables:
Device: Buri 1.5 MOZ
BuildID: 20140331040200
Gaia: 26839cb46f856d610b192f5655a8c38a6bfe0829
Gecko: d8e8f13bd4ae
Version: 31.0a1
Firmware Version: v1.2-device.cfg
Comment 15•12 years ago
|
||
Comment on attachment 8399142 [details] [diff] [review]
Fixing the JS error
Review of attachment 8399142 [details] [diff] [review]:
-----------------------------------------------------------------
The bug is from here, not from nsURLFormatter.
https://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#192
192 pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZ_MOZILLA_API_KEY%");
nsURLFormatter is looking for MOZ_MOZILLA_API_KEY in nsURLFormatter._defaults. It should be MOZILLA_API_KEY instead. Also, this patch breaks safebrowsing which uses GOOGLE_API_KEY correctly.
Thanks,
Monica
Attachment #8399142 -
Flags: review?(dougt) → review-
Comment 16•12 years ago
|
||
This bug was introduced in bug 977725. Doug, do you want to change all occurrences of MOZILLA_API_KEY to MOZ_MOZILLA_API_KEY?
| Assignee | ||
Comment 17•12 years ago
|
||
Attachment #8400186 -
Flags: review?(mmc)
Flags: needinfo?(dougt)
Updated•12 years ago
|
Attachment #8400186 -
Flags: review?(mmc) → review+
| Assignee | ||
Comment 18•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/15f36e5e47ac
fabrice, this is just to make you aware of this change.
Flags: needinfo?(fabrice)
Comment 19•12 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 20•12 years ago
|
||
(In reply to Doug Turner (:dougt) from comment #18)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/15f36e5e47ac
>
> fabrice, this is just to make you aware of this change.
ha, that needs to be backported to 1.3t.
blocking-b2g: - → 1.3T+
Flags: needinfo?(fabrice)
Comment 21•12 years ago
|
||
status-b2g-v1.3T:
--- → fixed
| Assignee | ||
Comment 22•11 years ago
|
||
status-b2g-v1.4:
--- → fixed
Updated•11 years ago
|
status-b2g-v2.0:
--- → fixed
Updated•8 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•