Why does Anki (Windows) try to access my precise physical location whenever it is launched?

Every time I launch the Windows version of Anki, it’s grabbing my precise physical location.

  • No addons are installed.
  • Automatically sync on profile open/close is disabled.

Maybe I’m having a senior moment, but I can’t figure out a way of disabling this in the settings. The only way is to deny all desktop apps access to my location via Windows 11 settings, even though the other few have very obvious reasons for requiring such access.

I’m not talking about geo IP lookups here, but my precise location.

Thanks.

I can’t think of why that would be. Anki just doesn’t care about your location. It reads the locale from your computer along with the time zone, but that’s a different thing.

You can check on your location privacy in Windows settings – and control app-by-app access to location. Feel free to turn Anki off in that list, because it doesn’t need it.

2 Likes

Hi. Thanks for the reply. I’m aware of the location settings, but granular “app-by-app” control is only provided for Microsoft Store apps, not traditional desktop apps. Therefore Anki’s precise location data access cannot be turned off in that list without disabling location services for every other traditional desktop app (such as all internet browsers) that I may want to access it.

Get-WinSystemLocale and Get-TimeZone don’t cause precise location data to be accessed with Powershell, so I’m not sure why Python’s equivalent of those calls is doing that, assuming that really is happening.

Oops! I hadn’t ever noticed that separate section because I have location access off for everything. I’m stumped, so I’ll leave it to a developer to respond about why Anki is trying that!

1 Like

I have location services turned off on debian linux (oldstable) as well but turned it on as a test. According to the gnome location settings, anki didn’t request location at any point for me (I did use anki after turning on location to make sure). I’d be suprised if it works differently on windows.

In theory it would be possible to request geolocation services though, see WebEngine Widgets Maps Example | Qt WebEngine 6.8.1.

But I searched for geolocation in ankis source code and there’s not a single occurence of that string. I checked like this:

rga --rga-max-archive-recursion=1000 --hidden -i "geolocation"

I’m not really a programmer (I just know enough C to write basic gtk apps). But I just don’t see how anki could request location in that case. Except, of course, your cards have some javascript that do that. If it’s not that either, maybe windows settings uses heuristics and it’s a false positive?

1 Like

Hi. I really appreciate your thoughts on this.

I’ve been searching through the repo for various keywords and API calls too, but I have yet to find the culprit. I considered using Windows Sandbox to test a fresh installation of Anki in an otherwise uncontaminated installation of Windows, but unfortunately, a bug with my Insider build prevents this for now. In the meantime, I created a test user in Anki to avoid loading my decks and custom cards. Even with this test user and an empty default deck, location access is still being triggered every time Anki launches.

I don’t believe the location status in Windows privacy settings is heuristic btw. Granular location access for Microsoft Store apps is possible due to the Universal Windows Platform (UWP) offering a more secure and sandboxed environment than traditional desktop apps. It should not be possible for UWP developers to ‘accidentally’ trigger a location request, and it’s straightforward for Microsoft to detect.

By contrast, traditional desktop applications can access system resources more directly and with fewer restrictions. I suspect that Microsoft is monitoring all kinds of specific methods from these that might leak location data (API calls, hardware device access, etc.) as attempts to access location. It would be helpful if they provided more specific information in a log.

Also, it’s been three years since I last reinstalled Windows, and I’ve used so many open source projects with sprawling python dependencies since then, yet none of them have been recorded attempting to access precise location. That seems remarkable if heuristics are really being used to determine location access. The other traditional desktop applications in the location access list were predictable and expected.

1 Like

Since you mentioned the Linux version, I installed it in Ubuntu (in WSL2) on Windows 11. Unlike the Windows version of Anki, it does not request location. The entry in the list is showing the Windows version.

Just figured I’d mention it in case anyone is troubleshooting this and it proves helpful. Something very specific to the Windows build is causing this location request.

1 Like

OK, I did a fresh installation of Windows 11 and immediately downloaded/launched Anki before doing anything else. There is now no question that upon launch, the Windows version of Anki is accessing precise location data.

When I use my laptop in particular, that corresponds to the exact latitude and longitude of where I am sitting.

Just to provide another data point:

I’m on a Windows 11 laptop with location turned on.

The only “desktop apps” that appear in that list for me are Firefox and Edge.

If it only happens when Anki first starts my guess is that maybe QtWebEngine is checking if the location API is available when it starts up, and that counts as accessing the location for some reason.

I have no idea why it would count on your computer, but not mine though.

3 Likes

Hi rossgb, thanks for your response. What a mystery this is! I’m now wondering if the Insider (Release Preview) build of Windows 11 might be the culprit. Perhaps it has more aggressive location access detection for desktop apps (covering additional API calls or whatever). I’ve just unenrolled from the Insider programme and plan to install the latest public release. I’ll let you know how I get on.

Looking back at the first image you posted I just noticed it listed Steam as having accessed your location that day.

I’ve also got Steam on my laptop, but it is not in my list. I cannot think of anything that you would do in Steam that would require precise location either.

I wonder if it is not just Anki. Maybe there is something odd about your laptop that is causing false positives.

2 Likes

I thought Steam did that because I changed my password via the Windows client. When confirming the request via the app, it shows the location the request came from on the confirmation screen. But maybe you’re right. I suspect this could be an issue with the Insider build. Verifying it takes time because I prefer testing with a freshly installed (non-Insider) build rather than rolling back, to avoid any remnants of the Insider build lingering.

Edit: Hmm, now I see two different times Steam did that, but I only changed the password once. OK, I’ll let you know what I find. Thanks again.

1 Like

I could be wrong, but I assume that location just comes from the IP address of the log-in attempt.

I assume Steam would not want to trust the location reported by the client for security reasons in that case.