navigator.geolocation.watchPosition success function run twice with geolocation override
Reported by
kamitaka...@gmail.com,
May 12 2018
|
|||||
Issue descriptionUserAgent: 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:
,
May 14 2018
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!
,
Jun 27 2018
Marking issues assigned to cco3@ as untriaged as they are no longer working on Chromium.
,
Jun 27 2018
,
Jun 28 2018
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 |
|||||
Comment 1 by krajshree@chromium.org
, May 14 2018