Closed Bug 1905717 Opened 1 year ago Closed 1 year ago

Fall back from geoclue to GLS

Categories

(Core :: DOM: Geolocation, task)

task

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 128+ verified
firefox-esr128 128+ verified
firefox127 --- wontfix
firefox128 + verified
firefox129 + verified

People

(Reporter: saschanaz, Assigned: emilio)

References

Details

Attachments

(2 files)

We don't properly fall back when geoclue fails to get location data, navigator.geolocation.getCurrentPosition just permanently stalls without response.

Emilio has some clue how to fix this.

Flags: needinfo?(emilio)

This prevents log spam but otherwise shouldn't change behavior.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Use 10s which feels it should be enough for geoclue to provide a
reasonable location, without feeling too slow for users.

Still if geoclue eventually gives us a proper location we'd update it
properly and stop the network fallback so this seems reasonable.

I made some naming tweaks for consistency but otherwise it should be
reasonably straight-forward.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1d15504c39f3 Prevent some spurious exceptions in network geo provider. r=saschanaz
Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5395918de7cd Add a timeout for geoclue -> GLS fallback. r=saschanaz
Keywords: leave-open
Duplicate of this bug: 1905224
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
No longer duplicate of this bug: 1905224

Comment on attachment 9410804 [details]
Bug 1905717 - Add a timeout for geoclue -> GLS fallback. r=saschanaz

Beta/Release Uplift Approval Request

  • User impact if declined: Geolocation doesn't work on some linux systems.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: QE has tested on nightly already. We're going to go with a smaller timeout (bug 1906091).
  • List of other uplifts needed: Bug 1906091
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): non-trivial patch but should be a strict improvement, and scoped to the geoclue back-end.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9410804 - Flags: approval-mozilla-release?
Flags: qe-verify+

Comment on attachment 9410804 [details]
Bug 1905717 - Add a timeout for geoclue -> GLS fallback. r=saschanaz

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Relatively high impact for users affected
  • User impact if declined: Geolocation won't work on Linux in some configuration
  • Fix Landed on Version: 129
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): See above.
Attachment #9410804 - Flags: approval-mozilla-esr115?
Duplicate of this bug: 1905224

Comment on attachment 9410804 [details]
Bug 1905717 - Add a timeout for geoclue -> GLS fallback. r=saschanaz

Approved for 128.0rc2.

Attachment #9410804 - Flags: approval-mozilla-release? → approval-mozilla-release+

Comment on attachment 9410804 [details]
Bug 1905717 - Add a timeout for geoclue -> GLS fallback. r=saschanaz

Approved for 115.13.0esr RC2.

Attachment #9410804 - Flags: approval-mozilla-esr115? → approval-mozilla-esr115+
Attachment #9410804 - Flags: approval-mozilla-esr128+

To work around this problem, set geo.provider.use_geoclue to false in about:config.

QA Whiteboard: [qa-triaged]

Reproduced the issue with Firefox 127.0.2 and Firefox 128.0a1 (2024-06-05) on a Debian 12 VM connected to Wi-Fi via Wi-Fi USB and Ubuntu 24 laptop connected to Wi-Fi. The test on https://mylocation.org/ failed to retrieve Latitude and Longitude data and also Google Maps accurate location is not displayed.

The issue is verified fixed with Firefox 115.13.0esr (20240703222632) and 129.0a1 (20240703213305) on the same stations. We verified that the location is correctly working on the following list with geo.provider.geoclue.mls_fallback_timeout_ms:5000 (as default). I have also verified the above list on macOS 12 and Windows 10x64 with Firefox 115.13.0esr (20240703222632) and 129.0a1 (20240703213305) and the location is working as expected.
We will verify this on the official 128.0 and 128.0esr build 2 when available.

This has also been verified as fixed on 128.0 RC2 and 128.0 ESR RC2 with Ubuntu 20.04 x64 and Debian 12 VM. The location works as expected and the geo.provider.geoclue.mls_fallback_timeout_ms pref is set to 5000 by default.

One unrelated bug to this fix was found during the verification, which has been filed under Bug 1906421.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Duplicate of this bug: 1824688
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: