core: Google Calendar integration stopped working
Home Assistant release with the issue:
0.99.3
Last working Home Assistant release (if known): 0.98.x
Operating environment (Hass.io/Docker/Windows/etc.):
Docker
Integration:
https://www.home-assistant.io/integrations/calendar.google/
Description of problem: My Google calendars are no longer appearing. Logs show the following 2 errors:
Error executing service <ServiceCall google.scan_for_calendars (c:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1242, in _safe_execute
await self._execute_service(handler, service_call)
File "/usr/src/homeassistant/homeassistant/core.py", line 1261, in _execute_service
await self._hass.async_add_executor_job(handler.func, service_call)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/google/__init__.py", line 255, in _scan_for_calendars
service = calendar_service.get()
File "/usr/src/homeassistant/homeassistant/components/google/__init__.py", line 349, in get
http = credentials.authorize(httplib2.Http())
AttributeError: 'NoneType' object has no attribute 'authorize'
google: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 441, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/google/calendar.py", line 104, in update
self.data.update()
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 240, in wrapper
result = method(*args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/google/calendar.py", line 170, in update
service, params = self._prepare_query()
File "/usr/src/homeassistant/homeassistant/components/google/calendar.py", line 133, in _prepare_query
service = self.calendar_service.get()
File "/usr/src/homeassistant/homeassistant/components/google/__init__.py", line 349, in get
http = credentials.authorize(httplib2.Http())
AttributeError: 'NoneType' object has no attribute 'authorize'
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 27 (3 by maintainers)
Ok, I sorted it. Here are the instructions:
I just tried to set this up today and I think I’ve had it working for all of 5 minutes. I keep getting timeout errors and nothing is loading.
I’ve gone all the troubleshooting steps, replaced the secret, reauthed, nothing is able to keep the integration connected.
I was having this issue a week ago, and reauthorized my calendars. Last night they started failing again with the same error reported by @TheLastProject in my logs. I am currently on 0.106.1
@danieledwardgeorgehitchcock I can confirm deleting the token and calender files worked. I’ll leave the issue open because that was obviously just a workaround, even though reauthing wasn’t very painful.