Google Maps location sharing - New thread


#121

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.


#122

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


#123

Not working for me too!


#124

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


#125

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


#126

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

#127

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


#128

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.


#129

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


#130

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

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


#131

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.


#132

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


#133

Hi mcfrojd, did you use Hassos or something else ?
And did you just follow this guide or you have to do more steps https://www.home-assistant.io/components/device_tracker.google_maps/ ?
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


#134

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?


#135

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


#136

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


#137

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 ?


#138

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:
2
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


#139

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. :frowning:


#140

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