navigator.geolocation.getCurrentPosition success callback not called when maximumAge option is specified
Categories
(GeckoView :: General, defect, P2)
Tracking
(Webcompat Priority:revisit, firefox101 wontfix, firefox102 wontfix, firefox103 fixed)
People
(Reporter: ksenia, Assigned: m_kato)
References
()
Details
(Whiteboard: [geckoview:p2] [geckoview:2022h2?] )
Attachments
(1 file)
As reported here https://github.com/webcompat/web-bugs/issues/43954
STR:
- Visit https://www.playnow.com/login/ in Firefox Fenix/ Fenix Nightly
- Enter login and password (can be anything)
- Click "Log in now" button
- Click "Allow" in the geolocation permission prompt
Expected behavior:
Form submit is happening and error message displayed: "Sorry, your login information did not match our records..."
Actual:
Form submit is not performed and submit button becomes disabled
A reduced test case:
https://codepen.io/ksy36/pen/NWWOKgJ
This seems to be caused by maximumAge specified in the options (maximumAge: 10000
). If I remove it, the success callback is fired.
Comment 1•5 years ago
|
||
I get expected behavior in Firefox for Android, but not in Fenix Preview. Is this a GeckoView bug?
Seems like it. Adding to triage.
Comment 3•5 years ago
|
||
The priority flag is not set for this bug.
:garvan, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Comment 4•2 years ago
|
||
Since we're fixing some other geolocation bugs, we should retest this bug.
Assignee | ||
Comment 5•2 years ago
•
|
||
When reporting current location by here, doesn't SendLocation send it?
Actually, GV uses that nsGeoPosition
's timestamp is older than PR_Now(). But other platform uses PR_Now() now, so can we fix it by using same way?
Assignee | ||
Comment 6•2 years ago
|
||
Assignee | ||
Comment 7•2 years ago
|
||
android.location.Location.getTime()
will return the acquired location time
that depends on location service. But maximumAge
will be calculated by
current time (PR_Now()
). So if the acquired time is old time,
nsGeolocationRequest::SendLocation
won't send the location due to too old
(isTooOld=true
in nsGeolocationRequest::SendLocation
).
Like other platforms, we should pass PR_Now as the location time instead.
Also, GVE sometimes hits debug assertion since heading and/or speed aren't
expected value, so this patch fixes this situation.
Updated•2 years ago
|
Comment 9•2 years ago
|
||
bugherder |
Comment 10•2 years ago
|
||
This is an old bug, so there's no rush to uplift this fix to Beta 102. The fix can ride the trains with 103.
Description
•