locationsharinglib: Future exception was never retrieved, error shows up randomly after component has been setup successfully

I have the following setup:

Home assistant installed in a virtual environment 0.68.1, python 3.6.3, ubuntu 17.10

The account is setup properly as the component will be setup right. The issue is that randomly I will receive the following error that repeats itself for at least 2.5 hours:

2018-05-06 16:13:14 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/device_tracker/google_maps.py", line 67, in _update_info
    for person in self.service.get_all_people():
  File "/srv/homeassistant/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py", line 324, in get_all_people
    people = self.get_shared_people() + [self.get_authenticated_person()]
  File "/srv/homeassistant/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py", line 291, in get_shared_people
    output = self._get_data()
  File "/srv/homeassistant/lib/python3.6/site-packages/cachetools/__init__.py", line 46, in wrapper
    v = func(*args, **kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py", line 285, in _get_data
    return json.loads(response.text.split("'", 1)[1])
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I see this error show up twice a minute. During the time of this error the component will not receive any updates. If I open an incognito window and navigate to https;//maps.google.com I am presented with a “are you a human” checkpoint where I have to select road signs or cars or whatever Google wants me to do. During this time the “are you a human” checkpoint shows up each time I close the incognito window, open it and navigate back to Google Maps no matter how many times I get the checkpoint right. If I restart home assistant the component will fail to setup and will not work. After a few hours I can restart home assistant again and the component will work again. It is not necessary to delete the cookies file during this time as the component will start working again after a few hours.

If there are any more details needed please let me know. I am also willing to apply any code updates on my end as well. I suspect though that any troubleshooting steps or logs needed will need to be grabbed during the time the “are you a human” checkpoint appears.

The odd part is that the last time I encountered this error it seemed to have resolved itself after 2.5 hours however if I decide to restart during this time the component will not work. Maybe there is some kind of time out?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Could you please give v.2.0.6 version a try and report back? I have added a valid user agent with and hope that this will fix the random locking out issues.