Closed Bug 1980653 Opened 5 months ago Closed 12 hours ago

Investigate native location API usage on Windows and consider migrating to modern Windows.Devices.Geolocation API

Categories

(Core :: DOM: Geolocation, task)

All
Windows
task

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: decoder, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We are seeing a high amount of geolocation fallbacks [1] on Windows, with implications for cloud costs.

The primary reason is likely that we still use the ILatLongReport API [2] which was only supported on Windows 7 and is considered deprecated and unreliable on Windows 10+ [3]. We should instead use the Windows.Devices.Geolocation API [4] which has better support for various workflows that involve requesting permission from the user, etc.

According to my research, ILatLongReport still works even on Windows 10 but can behave intermittently, and it is possible that we are interpreting intermittent errors as fatal instead of ignoring them. That said, there is no guarantee that fixes to how we currently use the deprecated API will provide us with a significantly better success rate and we likely should migrate to the newer API.

When doing the implementation for the new API we should also consider collecting more fine-grained Telemetry for the various ways in which that API can fail, if that's applicable. Our current Telemetry for ILatLongReport doesn't really give us any insights why the API calls might be failing.

[1] https://dictionary.telemetry.mozilla.org/apps/firefox_desktop/metrics/geolocation_fallback
[2] https://searchfox.org/mozilla-central/rev/6e2b186c296474e032d9ae2e000b7c870396775c/dom/system/windows/location/WindowsLocationChild.cpp#120
[3] https://learn.microsoft.com/en-us/windows/win32/api/locationapi/nn-locationapi-ilatlongreport
[4] https://learn.microsoft.com/en-us/uwp/api/windows.devices.geolocation?view=winrt-26100

Assignee: nobody → m_kato
Status: NEW → ASSIGNED
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/41cff3d4f567 https://hg.mozilla.org/integration/autoland/rev/503100e0759f Revert "Bug 1980653 - Implement Windows runtime location provider. r=win-reviewers,handyman" for causing build bustages @WindowsRuntimeLocationChild.cpp.

Backed out for causing build bustages @WindowsRuntimeLocationChild.cpp.

Flags: needinfo?(m_kato)

Although reverted fix doesn't include PWindowsLocation.ipdl that is converted from CRLF to LF. I will exclude it when re-landing this since I confirm to sheriff that it is OK.

Status: ASSIGNED → RESOLVED
Closed: 12 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: