I think the issue right now is getting the cookie for authentication. I was not able to get it set up in Hass.io yesterday. I also was not able download the cookie from another machine, but that may be my issue, no one else on the Github issue thread has mentioned the error that I was running into so that may still be a valid workaround.
People that have it working now may not notice an issue until their cookie expires.
Fixes issue with `device_tracker.google_maps` , where the used library stopped providing location data for the owner of the account that was used to query Google's location sharing API.
This is the continuation of [#18612](https://github.com/home-assistant/home-assistant/pull/18612) that seemed to have fixed the problem but did have a shortcoming... Now it is really, really working 😊
Hopefully this will solve the issues for me and many others having problems with this component.
Love the last sentence “Now it is really, really working ”
It is not available for version 3.0.9, because I use HASSIO and I’m waiting for a new version, but today, the content of my cookie file stays like this.
`'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
I got mine working with the workaround. I think the cookies file will always look like that unless you use a text editor that is able to read the funky encoding. Mine looks like that with the Add-on, “HASS Configurator” but has text with keys if i look with nano.
From @sherbang 's post with the workaround.
git clone https://github.com/lufton/locationsharinglib.git
cd locationsharinglib/
mkvirtualenv -p which python3 locationsharinglib
pip install -r requirements.txt
python cli.py --email ‘’ --password ‘’ --cookies-file .google_maps_location_sharing.cookies
Hi mcfrojd, did you use Hassos or something else ?
And did you just follow this guide or you have to do more steps Google Maps - Home Assistant ?
Because I stuck at TypeError: ‘NoneType’ object is not iterable now, I can use this location sharing 6 months ago but now I can’t, so now I will try using workaround method
I am using hass.io on a intel nuc.
I have no ide why mine is working now.
I used to run this google maps tracking as a custom component before it was official.
So there might be some old stuff from that?
But I wonder can you make a new setup and make it work again ? But I dont think new set up will work because this issue is still not fix, now I think I have to make my own .google_maps_location_sharing.cookies like workaround method said, but I can not use mkvirtualenv command work
Hi jeph, I am using Workaround solution, but when I type :
python cli.py --email [email protected] --password 111111 --cookies-file .google_maps_location_sharing.cookies
which is my dummy account, the terminal error:
Traceback (most recent call last):
File “cli.py”, line 143, in
main()
File “cli.py”, line 137, in main
CookieGetter(args.email, args.password, args.cookies_file)
File “/home/nguyen/Desktop/location/locationsharinglib/locationsharinglib/locationsharinglib.py”, line 349, in init
super(CookieGetter, self).init(email,
TypeError: super() argument 1 must be type, not classobj
What am I wrong ?
So finally I make It work follow the Workaround method mentioned above
I used a linux OS (Ubuntu 18.04 desktop), create a folder, open terminal inside that folder and typed exactly below:
git clone https://github.com/lufton/locationsharinglib.git
cd locationsharinglib/
virtualenv -p which python3 locationsharinglib
pip install -r requirements.txt
python3 cli.py --email ‘’ --password ‘’ --cookies-file .google_maps_location_sharing.cookies
End after 5 commands, you will see a file name .google_maps_location_sharing.cookies from the base of responsitory, just copy that file and replace it with the cookies file from HA by add on configurator, Note that the name of files must be the same or it will not work.
after that, restart and your location sharing will work like a champ. Mine is:
One more thing is that you have to install virtualenv :
which python3 will show the location of python3. mine is /usr/bin/python3
Hope this will have someone newbie and noob like me. Cheer
Since today my Google maps tracker is not woking and giving this error:
2018-12-27 15:52:16 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform google_maps
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 183, in async_setup_platform
disc_info)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 46, in setup_scanner
scanner = GoogleMapsScanner(hass, config, see)
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 66, in __init__
self._update_info()
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 78, in _update_info
for person in self.service.get_all_people():
File "/usr/local/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py", line 465, in get_all_people
people = self.get_shared_people() + [self.get_authenticated_person()]
File "/usr/local/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py", line 426, in get_shared_people
for info in output[0]:
TypeError: 'NoneType' object is not iterable
So for me it worked 14-15 days and now it’s not working again.