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

Issue 842443 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

navigator.geolocation.watchPosition success function run twice with geolocation override

Reported by kamitaka...@gmail.com, May 12 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce the problem:
1. open geoTest.html in a new chrome tab
2. Open Developer Tools > Console, Sensors (Geolocation)
3. Accept location permissions
4. observe one success line printed in console
5. adjust location using sensors emulation (geolocation)
6. observe two success lines printed in console
7. repeat 5-6 as necessary.

What is the expected behavior?
navigator.geolocation.watchPosition() should call success callback only once.

What went wrong?
watchPosition seems to be running the success function twice per coordinate received. The first run returns the cached coordinate data( incl. timestamp) and the second run returns the new data. (see screenshot)

Did this work before? Yes Chrome version: 61.0.3163.91 Chromium snapshot where it was working (https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/488517/)

Does this work in other browsers? N/A

Chrome version: 66.0.3359.139  Channel: stable
OS Version: 10.0
Flash Version:
 
geoTest.html
213 bytes View Download
geoTestSS.jpg
53.1 KB View Download
Labels: Needs-Bisect Needs-Triage-M66
Cc: nasko@chromium.org
Components: Blink>Geolocation
Labels: -Pri-2 -Needs-Bisect hasbisect-per-revision Target-67 M-68 RegressedIn-62 Target-66 FoundIn-66 FoundIn-67 FoundIn-68 Triaged-ET Target-68 OS-Linux OS-Mac Pri-1
Owner: cco3@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on reported chrome version 66.0.3359.139, latest stable# 66.0.3359.170, Beta# 67.0.3396.40 and latest chrome# 68.0.3429.0 using Windows-10, Mac 10.12.6 & Ubuntu 14.04  hence providing Bisect Info
Bisect Info:
================
Good build: 62.0.3174.0
Bad build: 62.0.3175.0

You are probably looking for a change made after 491206 (known good), but no later than 491207 (first known bad).
https://chromium.googlesource.com/chromium/src/+log/bb77fe5da00bcf2a64f65925deedb3da574a1b39..47f4fbf1f6cbe4d7b42581f0bc5a5f5545582bfd
Reviewed-on: https://chromium-review.googlesource.com/558604

@Conley Owens: Please confirm the issue and help in re-assigning if it is not related to your change.
Note: As the author's(Conley Owens) last visit is 25 days ago, hence CC'ing the reviewer(Nasko Oskov)

Thanks!
Owner: ----
Status: Untriaged (was: Assigned)
Marking issues assigned to cco3@ as untriaged as they are no longer working on Chromium.
Owner: mattreynolds@chromium.org
Status: Assigned (was: Untriaged)
Summary: navigator.geolocation.watchPosition success function run twice with geolocation override (was: navigator.geolocation.watchPosition results in success function run twice)
I can repro this with Chrome 67.0.3396.79.

My repro was slightly different in that watchPosition also returned two estimates when first called. This is probably because the page had a recent cached estimate. In general this is the desired behavior: return the cached estimate quickly and request a fresh estimate to be returned ASAP.

However, we should not re-send the cached estimate for an already-subscribed watchPosition when the override changes. If I understand correctly, this bug only occurs with the geolocation override.

Sign in to add a comment