Investigate native location API usage on Windows and consider migrating to modern Windows.Devices.Geolocation API
Categories
(Core :: DOM: Geolocation, task)
Tracking
()
| 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 | ||
Comment 1•1 month ago
|
||
Updated•1 month ago
|
Backed out for causing build bustages @WindowsRuntimeLocationChild.cpp.
| Assignee | ||
Comment 5•3 days ago
|
||
Passed https://treeherder.mozilla.org/jobs?repo=try&revision=1638e8cd8a335a57e59cd3ce033968719c16b482
| Assignee | ||
Comment 6•3 days ago
|
||
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.
Comment 8•12 hours ago
|
||
| bugherder | ||
Description
•