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

Issue 784886 link

Starred by 7 users

Issue metadata

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



Sign in to add a comment

geolocation getCurrentPosition() and watchPosition() include user permission time in timeout

Reported by bdma...@gmail.com, Nov 14 2017

Issue description

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

Steps to reproduce the problem:
1. Navigate to any secure (https) website that hasn't been allowed or blocked location permissions, e.g. https://www.chromium.org
   a. Check permissions at chrome://settings/content/location
2. Open DevTools > Console, and run this code:
navigator.geolocation.getCurrentPosition((x)=>console.log(x), (x)=>console.log(x), {timeout:1000})
3. Do not click Allow or Block, and wait 1 second.
4. Notice a PositionError with code set to timeout is written to the console.

What is the expected behavior?
Nothing should have been written to the console.  

What went wrong?
The timeout shouldn't start running until after the permission has been determined.  

"Note that the time that is spent obtaining the user permission is not included in the period covered by the timeout attribute. The timeout attribute only applies to the location acquisition operation."
https://dev.w3.org/geo/api/spec-source.html#timeout

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 62.0.3202.89  Channel: stable
OS Version: 10.0
Flash Version: 

I also tested this in the Dev build with the same result.

It did work correctly in Firefox 58.0b1 and Edge 40.15063.674.0
 
Components: Blink>Geolocation
Cc: divya.pa...@techmahindra.com
Labels: -Type-Bug -Pri-2 hasbisect-per-revision Triaged-ET M-62 Needs-Triaged-M62 OS-Linux OS-Mac Pri-1 Type-Bug-Regression
Owner: cco3@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on reported version 62.0.3202.89 and on latest canary 64.0.3268.0 using Windows 10, Ubuntu 14.04 and Mac 10.12.6, hence providing manual bisect info

Manual 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).
CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/bb77fe5da00bcf2a64f65925deedb3da574a1b39..47f4fbf1f6cbe4d7b42581f0bc5a5f5545582bfd

Reviewed on: https://chromium-review.googlesource.com/558604

Suspecting same from changelog.

@Conley Owens: Please confirm the issue and help in re-assigning if it is not related to your change.


Thanks!

Comment 3 by cco3@chromium.org, Nov 15 2017

Cc: reillyg@chromium.org mattreynolds@chromium.org
Seems likely, thanks.
Owner: mattreynolds@chromium.org
Status: Started (was: Assigned)
 Issue 785199  has been merged into this issue.
Hi @dev @testers,
Any updates regd. this issue fix?





















Comment 7 by battre@chromium.org, Nov 16 2017

Cc: cco3@chromium.org
Hi Varshu, I'm working on a fix. I merged your bug because I think it is caused by the same issue -- timeout timer is started too early, it should be started after the permission prompt is complete. This should prevent us from issuing multiple callbacks for the same location request.

WIP patch is here:

https://chromium-review.googlesource.com/c/chromium/src/+/773575

I will probably need to submit it after this maximumAge patch to keep the tests happy:

https://chromium-review.googlesource.com/c/chromium/src/+/703976
Thank you... 
we are Awaiting for the fix... 

Comment 10 Deleted

Hi mattreynolds@chromium.org, Hope you are working on this issue. May I please know when the fix will be live ?
subashni.arasu@, Matt already provided an update on their progress on this bug. Please do not repeatedly ping bugs asking for updates as it wastes developer time and adds noise to the issue report.
Hi,
Sorry to having you guys bothered again.
Looks like Chrome browser has released a next version(v.63) but this issue still seems to persist. 
Kindly update.
The change Matt mentions above has not landed yet. Given where we are in the Chrome release cycle if this fix is landed soon then it will be released in Chrome 65.
Thank you for your kind reply. 
We are awaiting for the fix as it is really important for our development purpose.
Do keep us updated.

Thank you. 

Hi,
Any updates regarding the fix? We could find the Chrome v.65 update is been released.

Thank you

Any updates please... 
Please refrain from pinging this issue for updates.
Okay, but as per Comment-14 the fix was to be released in v65. Hence, had to force myself from asking the issue fix updates.
Could you please tell the updated fix release timeline. 

Thanking you in advance.

Comment 20 by phistuck@gmail.com, Mar 22 2018

#18 -
No, it said, "if this fix is landed soon". Updates will be provided when the fix is landed, whenever that may happen.

Comment 21 by goo...@awe.media, Mar 29 2018

Confirming we're seeing this on OSX too (various versions) on chrome 65.0.3325.181 and 66.0.3359.66 (Chrome Beta).

Sign in to add a comment