New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 774875 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Geolocation doesn't react to network changes when Wifi is disabled

Project Member Reported by amoylan@chromium.org, Oct 16 2017

Issue description

Conditions:
* Wifi must be disbled.
* I expect this happens on Linux, Mac, or Windows desktop, and also ChromeOS. Confirmed on Mac.

Steps:
1. Go to a site that will use the geolocation watchPosition() API such as https://www.audero.it/demo/geolocation-api-demo.html.
2. Start watching position.
3. Enable a VPN or otherwise change the network configuration and the public IP address.

Expected:
A new network geolocation takes place and a new call to watchPosition() ensues.

Actual:
No new network geolocation takes place.

Root cause:
NetworkLocationProvider only detects changes in public IP address as a side effect of scanning wifi networks. Therefore IP address changes are ignored if Wifi scanning doesn't take place.

Arguably this is a feature request for improved geolocation. But I filed as a bug because the following more elaborate scenario shows a case where it has a pretty weird behavior:


Steps:
1. Go to a site that will use the geolocation watchPosition() API such as https://www.audero.it/demo/geolocation-api-demo.html.
2. Go to another such site (or the same one) in a new window side-by-side.
3. In the first window, open another tab with any site in it. Then switch back to the geolocation tab.
[So two tabs in the first window, one tab in the other, geolocation tab on top in both.]
4. Start watchPosition() in both windows.
5. Enable a VPN or otherwise change the network configuration and the public IP address.
[As above, geolocation will not update.]
6. In the first window, flip between the two tabs.
[No effect at this stage.]
7. Close the second window, leaving only the first window (with two tabs) open.
8. In the first window, flip between the two tabs.

Surprising:
Now that the other window is closed, new network geolocations *do* take place! 
This happens because GeolocationImpl is unbound when a tab stops being topmost. But as long as at least one GeolocationImpl is still topmost somewhere, the LocationArbitrator and its NetworkLocationProvider stays alive. By closing the other window and flipping between tabs, we get a fresh NetworkLocationProvider which thus makes a fresh network geolocation request ...


 

Comment 1 by scheib@chromium.org, Oct 19 2017

Labels: -Type-Bug Type-Feature
Thanks for the detailed report.  Seems pretty low priority, and mostly a feature vs a bug.

Comment 2 by scheib@chromium.org, Oct 19 2017

Status: Available (was: Untriaged)
Cc: -scheib@chromium.org
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 10

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by reillyg@chromium.org, Jan 16 (6 days ago)

Cc: mpawlow...@opera.com mattreynolds@chromium.org
Status: Available (was: Untriaged)
mattreynolds@ and mpawlowski@opera.com have been discussing a solution to this and other problems on a patch[1] for issue 672760.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/1273055

Sign in to add a comment