home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.61k stars 29.93k forks source link

Google Maps Integration - Error during setup of component device_tracker #71049

Closed rozhkovets closed 1 year ago

rozhkovets commented 2 years ago

The problem

when i tryed config google maps share location i get error message:

Logger: homeassistant.setup
Source: components/device_tracker/legacy.py:885
First occurred: 13:44:42 (1 occurrences)
Last logged: 13:44:42

Error during setup of component device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/__init__.py", line 50, in async_setup
    await async_setup_legacy_integration(hass, config)
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 156, in async_setup_integration
    tracker = await get_tracker(hass, config)
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 403, in get_tracker
    devices = await async_load_config(yaml_path, hass, consider_home)
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 885, in async_load_config
    device.pop("vendor", None)
TypeError: pop expected at most 1 argument, got 2

What version of Home Assistant Core has the issue?

core-2022.4.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Maps

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_maps/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

google_maps documentation google_maps source (message by IssueLinks)

seeb91 commented 2 years ago

Same here im trying 3rd day to setup it and still not working.

Logger: homeassistant.components.google_maps.device_tracker
Source: components/google_maps/device_tracker.py:82
Integration: google_maps (documentation, issues)
First occurred: 18:54:08 (1 occurrences)
Last logged: 18:54:08

The cookie file provided does not provide a valid session. Please create another one and try again

and

Logger: homeassistant.components.device_tracker
Source: components/device_tracker/legacy.py:271
Integration: Śledzenie urządzeń (documentation, issues)
First occurred: 18:54:08 (1 occurrences)
Last logged: 18:54:08

Error setting up platform legacy google_maps
VikeDragon commented 2 years ago

Same errors. HA core-2022.5.5

Logger: homeassistant.components.google_maps.device_tracker Source: components/google_maps/device_tracker.py:82 Integration: google_maps (documentation, issues) First occurred: 19:01:39 (8 occurrences) Last logged: 19:01:39

The cookie file provided does not provide a valid session. Please create another one and try again

and this

Logger: homeassistant.components.device_tracker Source: components/device_tracker/legacy.py:271 Integration: Отслеживание устройств First occurred: 19:01:39 (8 occurrences) Last logged: 19:01:39

Error setting up platform legacy google_maps

seeb91 commented 2 years ago

I figured it out and working fine. Just delete ".txt" from cookie..... Just so simple

rozhkovets commented 2 years ago

HA 2022.5.5 all of a sudden it worked

VikeDragon commented 2 years ago

I figured it out and working fine. Just delete ".txt" from cookie..... Just so simple

HA 2022.5.5 Still not working! I described a situation when renaming a file is done correctly, without .txt. This has been a well-known fact for a long time. But the integration does not work correctly. The data is constantly outdated and cannot be used. I have tried all the options for connecting cookies - none of them helps. Maybe instead of ridiculous advice, it's time to redo the integration so that it works correctly?

seeb91 commented 2 years ago

It is working fine for me since i delete .txt extention, tracking 4 devices :) I also export cookies with clean Linux on VM, using firefox maybe try that also

rozhkovets commented 2 years ago

Still not working!

i did export cookies via Cent Browser 4.3.9.248(Chromium 86.0.4240.198) of course, I have previously removed *.txt from the filename and in 2022.4.7 it not working, but in 2022.5.5 all works.

the only thing i changed was using a different google account. The previous account name used a dot in name (blabla.blabla@google.com). Now i use account with out dot.

VikeDragon commented 2 years ago

Still not working - 2022.6.2

huiyanga commented 2 years ago

Same errors. HA core-2022.5.5 and update to 2022.6.4 Logger: homeassistant.setup Source: components/device_tracker/legacy.py:306 First occurred: 11:04:57 (1 occurrences) Last logged: 11:04:57

Error during setup of component device_tracker Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component result = await task File "/usr/src/homeassistant/homeassistant/components/device_tracker/init.py", line 50, in async_setup await async_setup_legacy_integration(hass, config) File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 161, in async_setup_integration legacy_platforms = await async_extract_config(hass, config) File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 306, in async_extract_config raise ValueError( ValueError: Unable to determine type for gpslogger: None

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

mvaneijken commented 2 years ago

This issue is still present in version 2022.9.2.

thor0215 commented 1 year ago

I was having this issue when I first set this up with 2022.12.0 today. I was using the Chrome get_cookies.txt extension. I then tried the Firefox Export_cookies addon. That worked. The difference I see is the Chrome version is adding a lot more cookies in the file. It looks like the google maps device tracker only wants the accounts.google.com and .google.com cookies. I then took my Chrome exported file and parsed it with grep and using sed added the Netscape Cookie header like this:

grep -e '^.google.com' -e '^accounts.google.com' google.com_cookies.txt | sed '1i # Netscape HTTP Cookie File\n' > .google_maps_location_sharing.cookies.location_tracker_gmail_com

Now my google maps device tracker config works.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

pnbruckner commented 7 months ago

@rozhkovets @seeb91 @VikeDragon @huiyanga @mvaneijken @thor0215 I'm working on significant updates to this integration. I'm testing these changes via a custom integration, which is available here: https://github.com/pnbruckner/ha-google-maps. You might want to give it a try. If you do, I'd appreciate any feedback, good or bad. You can provide comment via an issue in that repo, or in this HA community forum topic: https://community.home-assistant.io/t/enhanced-google-maps-integration/682993.