[Google Nest] Oauth_timeout

Hi,

I’m new to home-assistant and installed HOAS in a VM on Truenas Scale. Everything is working fine so far but I’m running into an issue when trying to connect my Google Nest Doorbell through the Google Nest integration. I followed the following tutorial and watched the included video as well (Google Nest - Home Assistant).

I’ve gone through all the steps and everything seems to be created alright in the google Cloud services. When I add the Google Nest integration I add my Oauth Credentials, Cloud Project ID and Device Project ID. I get the redirect to the Google website to confirm access is allowed etc. and in the final step of the setup I have to click the “Link account to Home Assistant” button after which I get redirected to my Home-assistant installation. Here it starts loading, and then without error message just stops. I checked the DevTools network response and which tells me this:

{"type":"abort","flow_id":"XXXXXXX","handler":"nest","reason":"oauth2_timeout","description_placeholders":null}

When I check the Home Assistant logs I see this:

Logger: homeassistant.helpers.config_entry_oauth2_flow
Source: helpers/config_entry_oauth2_flow.py:319
First occurred: March 24, 2023 at 20:03:26 (9 occurrences)
Last logged: 18:02:38

Timeout resolving OAuth token:

I tried Googling the oauth2_timeout error but I can’t see to find a solution. I tried deleting all the Google Cloud stuff and remaking it, new oauth token etc. but the problem keeps persisting, the timeout problem might be due to a bad url or something but the only URL I had to set was in the Oauth credentials themselfs and I’ve check that like 10 times. I’m kinda at a loss.

Any help would be appreciated.

1 Like

Hi LaurensVE,

I’m running into this same problem, have now for several weeks, and I’m hoping you got it resolved. If so, can you let me know how?

Thanks.

1 Like

I am seeing the exact same behavior and log entries. Everything goes smoothly until the HA account linking step, which spins for a while and then times out. The Nest integration never finishes loading.

FIXED FOR ME - I have been experiencing some connectivity issues lately with my home IoT devices. I am using a Ubiquiti Unifi Dream Machine SE as a router/gateway.

Turning off IGMP Snooping in the network settings might have just fixed this. It’s the only thing I’m aware of changing, and it has suddenly started working. Worth a try, if your networks have a similar setting to protect against IGMP floods.

I was having this issue, turned out to be ipv6. I disabled ipv6 on my router and that took care of it.

2 Likes

After a considerable number of hours invested in my Google task (Oauth) internation, I came across this thread.

I’m using HA with Hyper-v as virtualization layer. I tried to change the network settings, deactivated all kinds of layers and filter in the network switch etc. - no luck.

Last thing I tried, was to deactivate the IPv6 as @dclawso has suggested and that worked!!! (HA UI → Settings → Network IPv6 → Deactivate) It still wonders me, but I can reproduce that the OAuth Token will time out if I don’t have it deactivated.

1 Like

I have the same problem, finally I find the problem is on the network, I set up a VPN in the router, then the HA system could visit google home, following the good nest instruction, then it succeed