I just upgraded HA to the latest version hoping that Google Maps Location Sharing component would work again but it doesn’t.
Since it changed to the cookie system I don’t get it to work.
I’ve tried with Firefox cookie plugin but it doesn’t work.
I then tried with cookie.txt from Chrome, it works the first time I set the cookie, but it stops working almost immediately. It’s difficult to explain the behaviour but the end is that it doesn’t work.
I’m really curious to know how many persons struggle with this component. Am I the only one that has troubles?
Before the cookie system was introduced (I believe till version 0.80 or so) I didn’t have any problem and I was really happy it.
i’ve same issue since v0.98 (? or 0.99 … ??)
to resolve it :
Use Firefox, in private mode.
Before, install Export Cookies Plugin
go to https://www.google.com/maps/
connect with your account
Export cookie for google.com, don’t use the “prefix httponly cookies” option !
rename the cookie.txt file with the good name in your config directory.
Don’t forget config in configuration.yaml :
Thanks you for your replies, but I think I give up on this integration.
I followed @JB_Marchetti instructions, step by step.
The first time I rebooted it was working fine, and so it did for about 10 minutes. Then I had to reboot again my HA and now I get always the same error:
The cookie file provided does not provide a valid session. Please create another one and try again.
The exact same cookie was working fine just few minutes before.
I even tried to create a new one with the same procedure but now it keeps giving me the error.
It looks like the session expired and there is some kind of cache that “remembers” it.
Ok, I didn’t gave up and I made some more test and I think I finally understood my problem.
As long as I set only one account to Google Maps Location Sharing everything works (it worked fine for a full day).
But since I have to track two more accounts I added them today and after few minutes I started to get “Error 429” which means that Google detected too many request and finally banned my ip.
@JB_Marchetti how many accounts are you tracking, one or more?
At this point I’m pretty stuck because I don’t know what to do.
Personally I’ve had a heck of a time with this as well.
Currently I have a separate Google account created and share each my own and my wife’s location with this account (worth noting I do NOT have 2FA on this account - and further that this is the account I’ve setup in configuration.yaml)
My Google Maps location tracking broke recenlty also. I was using the python google maps cookie getter and one of the recent updates broke it (0.99 maybe?). The only way I could get it to work was using JB_Marchetti’s method of Firefox in private mode. I could not get it to work with Chrome or standard Firefox.
I have 2 phones, and a 3rd account, 3rd account sees the 2 phones on google maps, I see them moving.
Made a cookie file, and for some reason only 1 account is working.
My phone says “source : none”
Hi JB,
could explain what you mean with “the good name”?
I’m on a clean install, and the “initial” cookie is not being generated due to the same error message, so I cannot copy from there.
Thx
The right name … good name in my bad french english … is th cookie name like that :
.google_maps_location_sharing.cookies.[YOUR_MAIL_ADRESS]_gmail_com
Blockquote
Save the cookie file to your Home Assistant configuration directory with the following name: .google_maps_location_sharing.cookies. followed by the slugified username of the NEW Google account. Make sure to use the .com TLD (e.g., maps.google.com), otherwise the cookie won’t be able to provide a valid session.
For example: If your email address was [email protected] , the filename would be: .google_maps_location_sharing.cookies.location_tracker_gmail_com .