Nest Integration Setup Failing Reauthentication

Hi Folks, I’m having an issue getting the Nest Integration set up. It is failing after I enter the project ID.

Here is some related log content:

Logger: homeassistant.config_entries
Source: components/nest/
First occurred: 2:29:06 PM (2 occurrences)
Last logged: 4:57:51 PM

Error setting up entry OAuth for Web for nest


Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/nest/", line 188, in async_setup_entry
    await subscriber.start_async()
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 416, in start_async
    await self._subscriber_factory.async_new_subscriber(
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 261, in async_new_subscriber
    return await loop.run_in_executor(
  File "/usr/local/lib/python3.9/concurrent/futures/", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 284, in _new_subscriber
    creds = self._refresh_creds(creds)
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 272, in _refresh_creds
  File "/usr/local/lib/python3.9/site-packages/google/oauth2/", line 302, in refresh
    ) = reauth.refresh_grant(
  File "/usr/local/lib/python3.9/site-packages/google/oauth2/", line 322, in refresh_grant
    response_status_ok, response_data = _client._token_endpoint_request_no_throw(
  File "/usr/local/lib/python3.9/site-packages/google/oauth2/", line 115, in _token_endpoint_request_no_throw
    response = request(method="POST", url=token_uri, headers=headers, body=body)
  File "/usr/local/lib/python3.9/site-packages/google/auth/transport/", line 199, in __call__
    six.raise_from(new_exc, caught_exc)
  File "<string>", line 3, in raise_from
google.auth.exceptions.TransportError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

I looked at traffic using Wireshark and it appears that Google is terminating the TCP connection after it receives the TLS Client Hello from Home Assistant.

I have read many posts regarding Nest Integration issues, but have not made progress. Has anyone come across a similar issue and/or be able to help?

Thanks in advance!

I’ve tried both Desktop App and Web App setups. Both fail in the same way.

I’m getting similar issue, any suggestions?

My Nest integration was working fine but then got this error after a reboot

Logger: homeassistant.config_entries
Source: helpers/
First occurred: 7:13:26 PM (1 occurrences)
Last logged: 7:13:26 PM

Error setting up entry Dooley’s Home for nest
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/nest/", line 204, in async_setup_entry
    await subscriber.async_get_device_manager()
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 485, in async_get_device_manager
    return await self._device_manager_task
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 490, in _async_create_device_manager
    structures = await self._api.async_get_structures()
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 27, in async_get_structures
    response_data = await self._auth.get_json(self._structures_url)
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 78, in get_json
    resp = await self.get(url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 71, in get
    resp = await self.request("get", url, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/google_nest_sdm/", line 55, in request
    access_token = await self.async_get_access_token()
  File "/usr/src/homeassistant/homeassistant/components/nest/", line 51, in async_get_access_token
    await self._oauth_session.async_ensure_token_valid()
  File "/usr/src/homeassistant/homeassistant/helpers/", line 452, in async_ensure_token_valid
    new_token = await self.implementation.async_refresh_token(self.token)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 87, in async_refresh_token
    new_token = await self._async_refresh_token(token)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 174, in _async_refresh_token
    new_token = await self._token_request(
  File "/usr/src/homeassistant/homeassistant/helpers/", line 192, in _token_request
    resp = await, data=data)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/", line 634, in _request
  File "/usr/local/lib/python3.9/site-packages/aiohttp/", line 721, in __exit__
    raise asyncio.TimeoutError from None

@_Cal , it looks like my issue was networking-related. In my case I have HA running an VMware Workstation VM. The host OS is Windows 10. I believe something in the Windows 10 host was causing duplicate packets to appear to be sent by the HA virtual machine, causing all kinds of strange things, including the failure of the Nest setup. Do you also have HA in a virtual machine on a Windows host?

Yeah same thing, VM on Windows 10 Machine, What did you do to fix?

@_Cal , I fiddled around with VMware networking and nothing I did there made any difference. I googled and found this: VMWare Workstation – DUP! packet issue resolved…sort of. At the bottom of this short blog the author says they enabled, then disabled the Routing and Remote Access Service. The author of the blog said they theorized that doing so configured something that resulted in fixing their problem. It sounded dubious, but benign, so I tried it. On my system it was disabled initially, so I set to to Manual startup, started it manually, stopped it, then returned it to disabled. This was about a day ago and it’s been working since then. I also stopped seeing duplicate packets in Wireshark captures.