core: Google Device Tracker - Invalid Session/Error setting up platform legacy
Home Assistant release with the issue: 0.99.0 (Now - 0.99.2)
Last working Home Assistant release (if known): 0.98.5
Operating environment (Hass.io/Docker/Windows/etc.):
| arch | x86_64 |
|---|---|
| dev | false |
| docker | false |
| hassio | false |
| os_name | Linux |
| python_version | 3.7.3 |
| timezone | America/Chicago |
| version | 0.99.0 |
| virtualenv | true |
Component/platform:
Google Device Tracker
Description of problem:
Updated - Have to redo the cookie file, restart, then it only updates a Single time. Location services never updates again. This is also relate to Chrome cookie export or python based.
Google device tracker no longer tracking. Only two messages provided in the logs. Have regenerated new cookie yielding same results.
2019-09-19 10:18:08 ERROR (SyncWorker_9) [homeassistant.components.google_maps.device_tracker] The cookie file provided does not provide a valid session. Please create another one and try again.
2019-09-19 10:18:08 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Traceback (if applicable):
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 98 (6 by maintainers)
For those who still have problems, even starting from scratch;
old cookie method accepted username without @gmail.com
new cookie method has to include @gmail.com like below;
device_tracker:- platform: google_mapsusername: YOUR_USERNAME@gmail.comIt works, buuut… it’s not showing my family. Just one of my devices without picture / avatar and no battery level and status.
Update - Solved!
I’ve done all steps with chrome, but i think something about my multiple google accounts messed cookie.txt. So i installed Mozilla Firefox and only logged in with the correct one. File exported worked as before on 0.98.5. Thanks WedHumpDay and dshokouhi for precious informations!
I submitted a PR on the docs https://github.com/home-assistant/home-assistant.io/pull/10688 Adding a note about using the correct TLD when creating the cookie.
Please respect that this is a bug tracker not a forum to discuss opinions. I’ve started from scratch. Setup another account and used Firefox with the cookie extension. Then I had to delete all irrelevant domains from the cookie (e.g. youtube). Now it works flawlessly and while it does it’s great!
Update - Resolved… Apparently this process changed again. Previously was using the python scripts, that would generate the cookie. Now, used the cookies.txt method.
What I did to get the cookies file:
Added the “cookies.txt” extension to Chrome. https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg?hl=en
Used Chrome to log into Google with the shared tracker account for the family
Clicked on the new extension and download the cookies.txt. Click on “click here”
I have tried lot of method (cookies.txt, python3 maps-cookie-getter, export cookies) but this failure still exists.