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. [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
Bug 1980653 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
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