New issue
Advanced search Search tips

Issue 737327 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug-Regression


Show other hotlists

Hotlists containing this issue:
Geolocation


Sign in to add a comment

navigator.geolocation failing on mobile Chrome when used with mock location provider

Reported by andygup....@gmail.com, Jun 28 2017

Issue description

Steps to reproduce the problem:
1. Hook up an external GPS that uses the mock location provider via bluetooth to an Android device
2. Verify the device is sending valid locations via logcat
3. Open app in mobile Chrome. App calls navigator.geolocation.watchPosition() using the following optional parameters { timeout: 60000, enableHighAccuracy: true, maximumAge: 0 }

What is the expected behavior?
I expect that I'd immediately get locations back. 

When the mock provider device is "disabled" then navigator.geolocation works correctly.

What went wrong?
The device OS threw an error in logcat and the geolocation attempt timed out:

06-27 17:44:11.370 6712-6985/? E/LocationClientHelper: exception when setting module id
                                                       java.lang.IllegalStateException: Unable to get current module info in ModuleManager created with non-module Context
                                                           at com.google.android.chimera.config.ModuleManager.getCurrentModule(:com.google.android.gms:1)
                                                           at tpn.a(:com.google.android.gms:17)
                                                           at tpr.b(:com.google.android.gms:13)
                                                           at too.a(:com.google.android.gms:4)
                                                           at kit.b(:com.google.android.gms:3)
                                                           at kjv.b(:com.google.android.gms:14)
                                                           at kks.b(:com.google.android.gms:7)
                                                           at kkk.b(:com.google.android.gms:25)
                                                           at txt.a(:com.google.android.gms:6)
                                                           at txs.b(:com.google.android.gms:1)
                                                           at txs.a(:com.google.android.gms:1)
                                                           at txs.a(:com.google.android.gms:15)
                                                           at tyc.a(:com.google.android.gms:8)
                                                           at ajuo.handleMessage(:com.google.android.gms:21)
                                                           at android.os.Handler.dispatchMessage(Handler.java:102)
                                                           at akwg.dispatchMessage(:com.google.android.gms:7)
                                                           at android.os.Looper.loop(Looper.java:154)
                                                           at android.os.HandlerThread.run(HandlerThread.java:61)

Did this work before? Yes Don't have that information

Chrome version: 58.0.3029.83  Channel: stable
OS Version: 7.1.2
Flash Version: 

Device type is a Nexus 6P. I am using a Trimble R1 external GPS. 

NOTE: When the Trimble R1 is connected I am able to get valid locations using a Cordova-based geolocation application that uses native GPS provider plug-in.
 

Comment 1 by tkent@chromium.org, Jun 28 2017

Components: -Blink Blink>Location
Owner: benwells@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: dougt@chromium.org
Owner: mcasas@chromium.org
Punting to devices team

Comment 4 by mcasas@chromium.org, Jul 11 2017

Cc: device-dev@chromium.org
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)

Comment 5 by scheib@chromium.org, Jul 12 2017

Cc: -device-dev@chromium.org
Labels: Needs-Feedback
andygup.edn@gmail.com would you clarify some points please:

This did work before? Roughly how long ago, you must have some information even if fuzzy.

What android version are you on?
What mock GPU providing android app are you using?
What external GPU device are you using?

Why are you doing this? This issue may languish as low priority as it's expected that devices have GPS built in and Chrome wasn't intentionally designed to work with mock locations.
>> This did work before?
I did a presentation using a Nexus 5 where it worked with a Trimble R1. That presentation is from March 2016.

>>What android version are you on?
Android 7.1.2, Nexus 6P

>>What mock GPU providing android app are you using?
GNSS Status - https://play.google.com/store/apps/details?id=com.trimble.mcs.gnssstatus&hl=en

>>What external GPU device are you using?
Trimble R1 - https://www.trimble.com/mappinggis/r1-gnss-receiver.aspx

>>Why are you doing this?
We have customers with JavaScript skills wanting to build web-based, non-Cordova-based field data collection apps. Looks like they will have to use Cordova or go native.

>>This issue may languish as low priority as it's expected that devices have GPS built in and Chrome wasn't intentionally designed to work with mock locations.
Thanks for the clarification. I'll include this info in my presentation tomorrow as well as future presentations and customer meetings.

Status: WontFix (was: Available)
I have tested Chrome with another mock GPS app selected in developer options (I do not have a Trimble R1 GNSS receiver) and the mock location is correctly reported to the web page.

Without the device to properly configure GNSS Status I cannot be sure but my suspicion is that there is a bug in this application that is exposed by Chrome requesting location through FusedLocationProviderApi that is not when requesting it from LocationManager. As there is a clear advantage to using the former for its higher accuracy this is not something we plan on changing.
Components: Blink>Geolocation
Components: -Blink>Location

Sign in to add a comment