Issue with Google Maps Location Tracking in Home Assistant

Hello everyone,

I’m using Google Maps for location tracking of my smart home users. Here’s my setup:

  • Google Account A shares its location with Google Account C.
  • Google Account B shares its location with Google Account C.

In the /config folder of Home Assistant, there is a file named:
.google_maps_location_sharing.cookies.my_account_c_mail_address_gmail_com
This file contains the cookies.txt exported using the Firefox browser plugin Export Cookies which I have created in incognito mode.

Additionally, my configuration.yaml includes the following entry:

device_tracker:
  - platform: google_maps
    username: "[email protected]"

This setup has been working perfectly until yesterday evening.
Since then, my location has not been updated in Home Assistant.

Here’s what I’ve tried so far:

  • Verified that location sharing is still active in Google Maps.
  • Disabled and re-enabled location sharing.
  • Recreated the cookie file.
  • Restarted Home Assistant.

Unfortunately, none of these steps have resolved the issue.

What could I be missing here?

For reference, here is my Home Assistant setup:

  • Core: 2024.11.0
  • Supervisor: 2024.11.2
  • Operating System: 13.2
  • Frontend: 20241002.4
  • Home Assistant is installed as HAOS via Proxmox using a qcow2 image.

Best regards,
Julian

Could be in the way you created the cooky file. If you do it the wrong way the cookies might get invalidated after you copy them. The instructions ask to uncheck “Prefix HttpOnly cookies”. I also remember some integrations such as Spotify ask to do it in incognito mode and close the browser without logging off to prevent cookies from being invalidated. The Google Maps integration does not call for that, but it might suffer the same fate.

Also make sure to check the logs for errors.

Hey Edwin_D,

thank you for your response! :slight_smile:

I created the cookie file in Firefox’s incognito mode, and the option Prefix HttpOnly cookies was disabled by default. I also made sure not to log out of my account while in incognito mode.

The only issues I see in my log files are related to the HACS integration called iCal, so they don’t seem to be connected to the Google Maps integration issue.

Let me know if there’s anything else I should check!

Best regards,
Julian

Hmm, that’s crazy.
Suddenly, the location tracking of Home Assistant users via Google Maps is working again even though I didn’t change anything since my last post.

I will observe this over the next few days.

Best regards,
Julian

Did you reboot your computer rather than restart HA this time? I have noticed in the past, when dealing with external interfaces to HA, a reboot will sometimes solve the issued I had where a simple HA restart had no effect.

This was released yesterday, so there definitely were some changes to your installation.

It could be related to the core updates, or maybe related to the Supervisor updates. The Supervisor updates automatically and you’re on .2 version of this month’s release.

This might explain why it suddenly started working again all by itself. Either way, I’m glad your issue fixed itself.