core
core copied to clipboard
Google Calendar integration not loading / stuck on "Please wait..." then timing out
The problem
This issue has been previously explained here: https://github.com/home-assistant/core/issues/90147#event-8898519873
What version of Home Assistant Core has the issue?
core-2023.3.6
What was the last working version of Home Assistant Core?
core-2023.2.5
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Google Calendar
Link to integration documentation on our website
https://www.home-assistant.io/integrations/google/
Diagnostics information
The issue first started when the integration failed to load. The errors were:
Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:162 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: March 30, 2023 at 3:30:27 PM (99 occurrences) Last logged: 1:39:09 PM
[139991930098768] Error handling message: unexpected character: line 1 column 1 (char 0) (unknown_error) mitzu from 192.168.100.101 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36) [139991937145472] Error handling message: unexpected character: line 1 column 1 (char 0) (unknown_error) mitzu from 192.168.100.101 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36) [139991937151136] Error handling message: unexpected character: line 1 column 1 (char 0) (unknown_error) mitzu from 192.168.100.101 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36) [139991930098768] Error handling message: Cannot delete credential in use by integration google (unknown_error) mitzu from 192.168.100.101 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36) [139991934813040] Error handling message: unexpected character: line 1 column 1 (char 0) (unknown_error) mitzu from 192.168.100.101 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36)
and
Logger: homeassistant.config_entries Source: helpers/config_entry_oauth2_flow.py:201 First occurred: March 30, 2023 at 3:35:43 PM (2 occurrences) Last logged: 1:43:09 PM
Error setting up entry [email protected] for google Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/google/init.py", line 167, in async_setup_entry await session.async_ensure_token_valid() File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 499, in async_ensure_token_valid new_token = await self.implementation.async_refresh_token(self.token) File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 92, in async_refresh_token new_token = await self._async_refresh_token(token) File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 182, in _async_refresh_token new_token = await self._token_request( File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 201, in _token_request resp = await session.post(self.token_url, data=data) File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 467, in _request with timer: File "/usr/local/lib/python3.10/site-packages/aiohttp/helpers.py", line 721, in exit raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError
After removing the Integration and trying to add it again, it displays a message "Please wait while preparing the Google Calendar workflor" (or similar) and then it times out.
Error thrown when timing out:
Logger: homeassistant.components.google.config_flow Source: components/google/config_flow.py:95 Integration: Google Calendar (documentation, issues) First occurred: 1:34:27 PM (1 occurrences) Last logged: 1:34:27 PM
Timeout initializing device flow: [Errno 110] Operation timed out
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
The issue has been traced to the following commit: https://github.com/home-assistant/core/commit/939eef3b28afa326eb34b6485af2cd25a512c523
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (websocket_api
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of websocket_api
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign websocket_api
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
websocket_api documentation websocket_api source (message by IssueLinks)
Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (google
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of google
can trigger bot actions by commenting:
-
@home-assistant close
Closes the issue. -
@home-assistant rename Awesome new title
Renames the issue. -
@home-assistant reopen
Reopen the issue. -
@home-assistant unassign google
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
google documentation google source (message by IssueLinks)
Thank you for filing a separate issue as the details here are very different than the other issue, even though the symptoms may be similar. It is really helpful since the installation method, error messages, etc are all different.
I see this report fairly often which means that home assistant is having a timeout talking to Google's server. This is commonly reported due to network configuration issues either specific to google, specific to home assistant. I've seen this reported with ipv6 issues, or adblockers, or other custom routing issues. (The specific code here raising the timeout is not Google Calendar code, but a common library shared across all integrations for refreshing oauth tokens.)
Here are some recent examples where i've seen this come up: Example: https://github.com/home-assistant/core/issues/85984 - "my Kubernetes installation was attempting to use the interface's IPV6 address, which would not route out correctly" Example: https://community.home-assistant.io/t/nest-integration-setup-failing-reauthentication/421760/7?u=allenporter - " it looks like my issue was networking-related. In my case I have HA running an VMware Workstation VM.... " - "check if you have PiHole in your network. If so, try to deactivate it for the time."
I find it strange that this issue seems to be intermittent. For example, after a restart yesterday, everything is working as expected and the integration is loading without any time outs ...
I'll try to keep an eye out for this and get back to this.
As it looks like no one else is having this issue, please close this thread. I'll try to follow the advices in the links if I get this again.
I actually have exactly the same issue: integration broke down, removed it (including the credentials) and when trying to reinstall I'm stuck as it times out every single time. You can get to the step of setting up the credentials, but the wizard does not load. Restarting does not solve the issue here.
I actually have exactly the same issue: integration broke down, removed it (including the credentials) and when trying to reinstall I'm stuck as it times out every single time. You can get to the step of setting up the credentials, but the wizard does not load. Restarting does not solve the issue here.
I think in my case, disabling the IPv6 from Network Settings fixed the issue.
I actually have exactly the same issue: integration broke down, removed it (including the credentials) and when trying to reinstall I'm stuck as it times out every single time. You can get to the step of setting up the credentials, but the wizard does not load. Restarting does not solve the issue here.
I think in my case, disabling the IPv6 from Network Settings fixed the issue.
Here it doesn't look like that is solving it. You just disabled the checkmark, right? I also restarted HA, still the same issue. Killing me! The integration was such an easy one to do before.
How did the integration "break"? Was that also showing up as a network issue?
I often find when folks remove the integration and it just makes the problem harder to diagnose (e.g. you now no longer have diagnostics). I get it though, just doing our best to get it going again.
Every time we have looked at this it is because of ad blockers or some other DNS or network issue. Literally every time even thougb we get push back initially that it can't possibly be a network issue. (That said, we also have few new tricks to help diagnose right now though can look into more logging or better error messages)
I actually have exactly the same issue: integration broke down, removed it (including the credentials) and when trying to reinstall I'm stuck as it times out every single time. You can get to the step of setting up the credentials, but the wizard does not load. Restarting does not solve the issue here.
I think in my case, disabling the IPv6 from Network Settings fixed the issue.
For me that also fixed it.
I unchecked the box for IPv6 in my network settings (windows device) but that did not solve it. What were the settings that you have adjusted in order to make this work? Thanks!
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.