Google Maps location sharing - New thread


I think the issue right now is getting the cookie for authentication. I was not able to get it set up in 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.


Not working for me… From some googling seems its a combination of captcha and different country logins.


Not working for me too!


working fine for me… have you restarted your home assistant? After “a while” you should see a cookie file appear in the config folder.


Upcoming PR
Update locationsharinglib to 3.0.9

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]( 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 :blush:


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


Thank you guys very much for shared information.
Yeah my cookies file is look like above too. I’m trying to fix it.


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.


Hi Jeph
Can you tell me what your " working with the workaround " is ? Sorry for my bad english


I found the workaround from @sagilo 's issue on github

From @sherbang 's post with the workaround.
git clone
cd locationsharinglib/
mkvirtualenv -p which python3 locationsharinglib
pip install -r requirements.txt
python --email ‘’ --password ‘’ --cookies-file .google_maps_location_sharing.cookies


After upgrading to 0.84.1 now Google Maps tracking finally work, i had to delete the old cookie file.
Hopefully the latest changes fixed the problem.


Still not working for me :disappointed_relieved: I tried to delete the cookie bot no change…What could be wrong?


Hi mcfrojd, did you use Hassos or something else ?
And did you just follow this guide or you have to do more steps ?
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 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?


I am using Ubuntu server, so maybe workaround is the only option right now, but thank you for sharing


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 --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 “”, line 143, in
File “”, line 137, in main
CookieGetter(, args.password, args.cookies_file)
File “/home/nguyen/Desktop/location/locationsharinglib/locationsharinglib/”, 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
cd locationsharinglib/
virtualenv -p which python3 locationsharinglib
pip install -r requirements.txt
python3 --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/", line 183, in async_setup_platform
  File "/usr/local/lib/python3.6/concurrent/futures/", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/", line 46, in setup_scanner
    scanner = GoogleMapsScanner(hass, config, see)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/", line 66, in __init__
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/", line 78, in _update_info
    for person in self.service.get_all_people():
  File "/usr/local/lib/python3.6/site-packages/locationsharinglib/", line 465, in get_all_people
    people = self.get_shared_people() + [self.get_authenticated_person()]
  File "/usr/local/lib/python3.6/site-packages/locationsharinglib/", 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. :frowning:


I deleted the cookie file and restarted, now it works again. :slight_smile: