Open Bug 1771475 Opened 3 years ago Updated 1 year ago

navigator.geolocation.watchPosition seems to be calling both success and error handlers, constantly

Categories

(Core :: DOM: Geolocation, defect)

x86_64
All
defect

Tracking

()

Tracking Status
firefox-esr91 --- affected
firefox101 --- affected
firefox102 --- affected
firefox103 --- affected

People

(Reporter: github, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

navigator.geolocation.watchPosition(() => console.log('success'), () => console.log('failure'), {enableHighAccuracy: true, timeout: 5000, maximumAge: 600000})

Actual results:

'success' appears on the console, followed by numerous 'failure's (timeout) every 5000 millis

Expected results:

'success' should have appeared, of 'failure' (timeout), not both

The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Console
Product: Firefox → DevTools
Component: Console → General
OS: Unspecified → macOS
Product: DevTools → Firefox
Hardware: Unspecified → x86_64
Component: General → DOM: Geolocation
Product: Firefox → Core
Attached file test.html
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: macOS → All
Version: Firefox 100 → Trunk
No longer depends on: 1903271

I can still repro this, after the initial success callback (by granting the permission from the popup) I constantly get both failure and success.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: