core: Error setting up platform google maps in 0.89.0

Home Assistant release with the issue: 0.89.0

Last working Home Assistant release (if known): 0.88.2

Operating environment (Hass.io/Docker/Windows/etc.): Virtualenv on RPi

Component/platform: Device Tracker/Google Maps

Description of problem: After upgrade hass from 0.88.2 to 0.89.0 platform Google Maps does not start

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: google_maps
  username: someemail@gmail.com
  password: someemailpass
  max_gps_accuracy: 100

Traceback (if applicable):

Error setting up platform google_maps

Traceback (most recent call last):
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/__init__.py", line 184, in async_setup_platform
    disc_info)
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/google_maps.py", line 46, in setup_scanner
    scanner = GoogleMapsScanner(hass, config, see)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/homeassistant/components/device_tracker/google_maps.py", line 66, in __init__
    self.service = Service(self.username, self.password, credfile)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/locationsharinglib/locationsharinglib.py", line 366, in __init__
    cookies_file=cookies_file)
  File "/home/pi/homeassistant/lib/python3.5/site-packages/locationsharinglib/locationsharinglib.py", line 225, in __init__
    self._authenticate()
  File "/home/pi/homeassistant/lib/python3.5/site-packages/locationsharinglib/locationsharinglib.py", line 263, in _authenticate
    self._submit_password()
  File "/home/pi/homeassistant/lib/python3.5/site-packages/locationsharinglib/locationsharinglib.py", line 306, in _submit_password
    raise InvalidCredentials(body)
locationsharinglib.locationsharinglibexceptions.InvalidCredentials: 
[["gf.sicr",null,null,5,null,[null,null,"type: FIRST_AUTH_FACTOR\n",1,null,"INCORRECT_ANSWER_ENTERED",null,null,1,6,null,null,null,null,null,"SOME EMAIL","someemail@gmail.com","https://lh3.googleusercontent.com/xxxxxxxxx/xx/photo.jpg",null,null,1,1,{"1001":[1]
,"5001":[6,["gf.uicd","xxxxxxxxxxxxxx"]
]
}]
]
]

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 37 (13 by maintainers)

Most upvoted comments

I confirm everything works as excepted now without upgrading so it must come from Google.

@reaper7 it’s using the slugging function that’s used across HA in a lot of places. I didn’t look at the code but based on what I see in my config folder, the slug should be someuser_gmail_com, hence the filename should be .google_maps_location_sharing.cookies.someuser_gmail_com If you have e.g. another . in the username like firstname.lastname@gmail.com, then the slug would be firstname_lastname_gmail_com

@ToSa27 - if username for google maps location sharing is someuser@gmail.com and old cookies file name is .google_maps_location_sharing.cookies what should be the name of the new file ??

.google_maps_location_sharing.cookies.someuser_gmail_com ??

EDIT: yes, with renamed file like this: .google_maps_location_sharing.cookies.someuser_gmail_com locationsharing works

hello all, i am also having this issue on hass.io on the pi, i have tried deleting cookie file etc and i am still getting this issue, it recreates the file and gives these errors in the log:

2019-05-01 08:11:24 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/device_tracker/__init__.py", line 177, in async_setup_platform
    disc_info)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/google_maps/device_tracker.py", line 39, in setup_scanner
    scanner = GoogleMapsScanner(hass, config, see)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/google_maps/device_tracker.py", line 60, in __init__
    self._update_info()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/google_maps/device_tracker.py", line 72, in _update_info
    for person in self.service.get_all_people():
  File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 439, in get_all_people
    people = self.get_shared_people() + [self.get_authenticated_person()]
  File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 400, in get_shared_people
    for info in output[0]:
TypeError: 'NoneType' object is not iterable
2019-05-01 09:11:14 ERROR (MainThread) [homeassistant.components.updater] Got unexpected response: None

i am happy to try this gmapslocsharing thats been mentioned in comments, but i am a new with this so i have now idea how to do it, but i am willing to give it a go if someone is willing to tell me step by step. thanks all.