core: Google Calendar integration not creating google_calendars.yaml (sudden error, was working before)

The problem As of 9 hours ago Google Calendar integration suddenly stopped working. First I got the 505 error. So I deleted the .google_token, restarted HA and authenticated HA again with Google Calendar. Then I got the 404 error. So I figured, well let’s remove the google_calendars.yaml as well and let HA create a new one. Deleted that and restarted HA. No yaml file was created. Then I deleted the .google_token yet again do start the proces again. Restarted HA, reauthenticated, (it even says the yaml is created at the notifications) but no yaml file is created. I even removed the client id and secret and created an entire new project. Filled in everything (also re-authenticated succefully again), still no yaml file. I reverted to the previous client id, re-authenticated yet again (got a notification saying the yaml file is created) and yet again: no google_calendars.yaml file. I have no issues using Google Calendars online (or using the apps) and have the API enabled on both projects.

Environment

Hostname homeassistant
System HassOS 4.11
Deployment production
Supervisor: 228
Running 0.112.4
  • Home Assistant Core release with the issue:
  • Last working Home Assistant Core release (if known):
  • Operating environment (OS/Container/Supervised/Core):
  • Integration causing this issue:
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml google: client_id: !secret google_calendar_client_id client_secret: !secret google_calendar_client_secret

Traceback/Error logs Logger: homeassistant.core Source: components/google/init.py:349 First occurred: 9:14:16 (1 occurrences) Last logged: 9:14:16

Error executing service: <ServiceCall google.scan_for_calendars (c:0d7d56b14fc945b5912f9c1c2678a9cf)> Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/core.py”, line 1276, in catch_exceptions await coro_or_task File “/usr/src/homeassistant/homeassistant/core.py”, line 1299, 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 257, in _scan_for_calendars service = calendar_service.get() File “/usr/src/homeassistant/homeassistant/components/google/init.py”, line 349, in get “calendar”, “v3”, http=http, cache_discovery=False File “/usr/local/lib/python3.7/site-packages/oauth2client/_helpers.py”, line 133, in positional_wrapper return wrapped(*args, **kwargs) File “/usr/local/lib/python3.7/site-packages/googleapiclient/discovery.py”, line 237, in build raise e File “/usr/local/lib/python3.7/site-packages/googleapiclient/discovery.py”, line 229, in build requested_url, discovery_http, cache_discovery, cache) File “/usr/local/lib/python3.7/site-packages/googleapiclient/discovery.py”, line 279, in _retrieve_discovery_doc raise HttpError(resp, content, uri=actual_url) googleapiclient.errors.HttpError: <HttpError 429 when requesting https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest returned “Too Many Requests”>

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 18 (5 by maintainers)

Most upvoted comments

I’ve got the same error in HA, and no errors or API limits reached (or even approached) on the Google end. I’d agree this looks to be a thing on Google’s end.

I’ve just set the calendar integration up too and started getting this error almost immediately, it does seem to be an issue with Google, there’s a workaround in this StackOverflow answer but I haven’t tried it and not sure if it’s viable here anyway. Guess we’ll have to wait for an answer on the issue from Google.

@ASNNetworks don’t bother doing a whole new account. I tried with an entirely separate account, new project/API, and completely clean new install of HA. Same issue. This seems to be an issue on either Googles side or with the way the integration is being called.

Yes, I can confirm: everything works again! Closing the for now 😃

@edif30 thanks for your quick reply, you save me a ton of time and headaches. In the meantime I’m looking at other ways to use Google Calendar (by CalDav or iCal) but that doesn’t seem to work so much.

I hope a lot of people experience this and come forward.

Edit: so what’s weird as well: I decided to disable the API to see what HA logs would then do. With the API disable it has the exact same error. How is that even possible? I figured since the API is disabled, it shouldn’t even be possible to do a request, let a lone too many.