Apparently you can set a Chrome extension to be allowed in an incognito window.
FWIW, the cookie file I downloaded is about 15 KB (as opposed to only 3 KB for the older, binary format), and has 70 lines. No idea which line(s) is/are necessary, so I just live with it.
EDIT: I just tried downloading the cookies.txt file from an incognito window and got pretty much the same file. Details are a bit different, but about the same size.
I just go directly to the Google Maps site, log in with the account I want to use in HA, click on the cookies.txt icon in the top-right corner, then click on the link in the window that pops up that says “To download cookies for this tab click here”.
Thnaks.
I found out how to enable the extension in incognito mode.
So I did pretty much as you described except I did log on to Google before going to Google Maps.
My cookies file is only 1KB and appears to only have two cookies in it.
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)
Not sure incognito mode is a good thing to use here. By definition, doesn’t that prevent the creation of cookies (so nothing useful to save to the file)??? I’m no browser expert, but it just seems that’s not going to get you what you want.
Me neither but I thought it behaved exactly as normal, it just didn’t save anything when it closed it’s session. Be that as it may it didn’t work for a second time so I’m going to try the Firefox route…
FWIW, it worked on Chrome for me, even with an account that uses 2FA. Not sure why you ran into trouble, but I’ve been noticing many people having problems with this recently. Who knows!
I suspect no-one!
Oh well, that’s 2 hours of my life I’ll never get back, but at least I have Firefox on my PC now. And I’ve been reading a lot of good things about it recently, privacy-wise. Maybe I’ll give it a go…
I just did an experiment. I opened a Chrome incognito window on a freshly installed VM (and just for grins made sure all history, including any cookies, were deleted.) I went to the Google Maps site and logged in. I clicked on the cookies.txt icon and it said there were no cookies for google.com and only offered to download “all cookies”, which I did. The file was basically empty (only comment lines.) So, maybe it really won’t work with a Chrome incognito browser.
Goodmorning everyone
I hung up following the guide to integrate the tracking on google maps but I can’t make it work. I have the following error:
2020-05-07 15:28:10 ERROR (SyncWorker_1) [homeassistant.components.google_maps.device_tracker] The cookie file provided does not provide a valid session. Please create another one and try again.
2020-05-07 15:28:11 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
I logged in google chrome with the second account, went to the google maps application and with the addon export cookies.txt I downloaded the cookies.txt file. I renamed it like this:
and I copied it to the homehassistant folder (I have hassio on docker on synology server) where there are also the configuration.yaml, script.yaml files. I entered the following code in configuration.yaml:
The problem I faced was the “.txt” was still there on the file.
Make sure you see the .txt and remove it. It’s a setting in Windows since win 7 I believe to not show the extension of known file formats.
Make sure you change that setting
Hi Hellis81, thanks for reply but the file doesn’t has .txt i’m sure because the type of file is “pippo_pluto_gmail_com” and not “file TXT”. I see that in the windows 7 directory.
For anybody coming back to this issue, it worked fine for me in firefox (not private mode) by grabbing the google.com cookies and make sure you do not save the cookies at TXT type!! Change the type to any before clicking save.