Home Assistant release with the issue:
0.99.0b0
-->
Last working Home Assistant release (if known):
0.98.5
Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io, Docker Ubuntu 14.8
Component/platform:
Google maps location sharing
Description of problem:
Location not showing up at all with 0.99.0b0 Tried redoing cookies with no fix.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
```- platform: google_maps
Traceback (if applicable):
platform: google_maps
username: YOUR_USERNAME``
Additional information:
2019-09-13 11:56:37 ERROR (SyncWorker_16) [homeassistant.components.google_maps.device_tracker] The cookie file provided does not provide a valid session. Please create another one and try again.
might be related to: https://github.com/home-assistant/home-assistant/pull/26361 ?
try to see if the docs update attached to that PR has updated info to fix your issue
Yeah tried the new text cookies, and still no joy.
Just an update to this, My first attempt was with Windows 10 which fails. I redid the cookies.txt using Ubuntu 18.4 and it is now working perfectly.
Thanks for letting us know @Bergasha, I'll close up the issue for now.
In case if it is not working for someone using Windows 10 to download cookies.txt.
Here are the steps which worked for me.
As mentioned in google maps component documentation:
@hemantkamalakar: Perfect explanation. That fixed it for me. I struggled with mapscookiegetter on an Ubuntu machine before not knowing it became that easy with the new HA Version. The mapscookiegetter way worked fine before but I didn't got it to work after the update. Thanks!
Good to know that it worked for you.
I have tried lot of method (cookies.txt, python3 maps-cookie-getter, export cookies) but this failure still exists.
I've tried before ff and chrome on win10 without success,
but for me chromium on ubuntu create good cookies :)
(HA 0.99.0)
Still cant generate proper cookie for google_maps platform for both FF and Chrome on Linux and W10.
P.S. I am hassio user.
2019-09-19 23:27:39 ERROR (SyncWorker_14) [locationsharinglib.Service] Things broke...
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 123, in _get_authenticated_session
session.cookies.update(pickle.load(cfile))
_pickle.UnpicklingError: invalid load key, '#'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 136, in _load_text_cookies
cookies = [Cookie(*line.strip().split()) for line in text.splitlines()
File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 137, in <listcomp>
if not line.strip().startswith('#') and line]
TypeError: __init__() missing 1 required positional argument: 'value'
I Still have the same problem with cookies. I try Chrome, Firefox and maps-cookie-getter
2019-09-24 19:42:56 ERROR (SyncWorker_6) [homeassistant.components.google_maps.device_tracker] The cookie file provided does not provide a valid session. Please create another one and try again.
Hello,
The cookie file provided does not provide a valid session. Please create another one and try again.
It worked before the update to 99.1 on docker.
I have created another cookie (ubuntu-way) now, and still not working.
arch | x86_64
-- | --
dev | false
docker | true
hassio | false
os_name | Linux
python_version | 3.7.4
timezone | Europe/Budapest
version | 0.99.1
virtualenv | false
I've also tried this at my hassio with the very same cookie, no luck.
arch | armv7l
-- | --
dev | false
docker | true
hassio | true
os_name | Linux
python_version | 3.7.4
timezone | Europe/Budapest
version | 0.99.2
virtualenv | false
Guys, just want to tell you that I have change my cookie form google.pl domain to google.com and that solved my problem. The device tracker is back on track.
Guys, just want to tell you that I have change my cookie form google.pl domain to google.com and that solved my problem. The device tracker is back on track.
Confirmed.
This solved my case. Just type google.com without a postfix in the address bar and save cookie again.
Which one browser? On linux or windows? Only Firefox create domain with ".pl", after change - no luck.
Which one browser? On linux or windows? Only Firefox create domain with ".pl", after change - no luck.
I've done it on Linux/Firefox and I am talking here about changing domain name FROM .pl to .com. Because of geolocation mechanizm google change the domain base on our location in implicit way.
In case if it is not working for someone using Windows 10 to download cookies.txt.
Here are the steps which worked for me.
As mentioned in google maps component documentation:
- You have to setup sharing through the Google Maps app on your mobile phone.
- Download and install cookies.txt chrome extension.
- Open Google Maps using Chrome and login using additional Google account with whom you have shared your location.
- Click on export cookies.txt extension. (Icon visible in Chrome next to Address bar)
- 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. For example: if your email was location.[email protected], the filename would be: .google_maps_location_sharing.cookies.location_tracker_gmail_com
- Restart Home assistant and you should see the location updates.
I took the time to register a account here just to say it *ucking worked and THANK you, been pulling my hair for 5 hours now to make this work. Your solution for how to get the cookie was my problem!
Most helpful comment
In case if it is not working for someone using Windows 10 to download cookies.txt.
Here are the steps which worked for me.
As mentioned in google maps component documentation: