question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nest Integration - Configuration failed at the very end of the process (once again)

See original GitHub issue

The problem

This issue is the continuation of https://github.com/home-assistant/core/issues/73455 (which was closed since resolved…but not for that much unfortunately).

To resume my problem (which may have changed from the original one), the “add integration” process fails at the very end: when I click on link account, a new browser tab is opened pointing to http://localhost:8123/auth/external/callback?code=***** but remains blank (nothing is loaded nor is loading). If I go back to the home assistant tab a pop-up is present saying something like Loading the next step for Nest. After a while (a minute or so) the message changes to Error.

As suggested in the previous issue, I activated advanced logs with the following lines in my configuration.yaml:

logger: 
  default: info 
  logs:
    homeassistant.helpers.config_entry_oauth2_flow: debug

However, the log is not so verbose:

Logger: aiohttp.server
Source: runner.py:120
First occurred: 18:01:26 (2 occurrences)
Last logged: 18:08:11

Error handling request

I also have this error in the registry but I am not sure it is related:

Logger: frontend.js.latest.202212131
Source: components/system_log/__init__.py:256
First occurred: 17:54:49 (2 occurrences)
Last logged: 18:02:06

:0:0 ResizeObserver loop completed with undelivered notifications.

As fat as I understand, there is no more information on the complete registry (concerning this problem).

In my previous post, @allenporter wrote:

The other related problems here i've seen are my home assistant url is not the same as the url you are using to talk to home assistant

But I did not understand what he meant. There may be part of the solution there…

I also tried to create new credential and then a new Device Access Project to see if I messed-up something, but nothing changed.

Thanks in advance for your help.

What version of Home Assistant Core has the issue?

core-2022.12.8

What was the last working version of Home Assistant Core?

Not known

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Google Nest

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nest/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

I do not understand why at the end of the process I have home-assistant.io as authorized domain in my OAuth Consent screen; I left it empty in the configuration process as per instructions. By the way, that may be normal…

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
allenportercommented, Dec 27, 2022

Container setup looks just fine. Thanks!

0reactions
Sonyoyocommented, Dec 30, 2022

Hello, I am working directly on the same machine where HA is installed, so I do not know why some other Android devices are connecting to something in the meanwhile.

I activated the debug log for the additional components and started the process again. This is the timeline:

  1. I started the process at 8.34
  2. I completed the process (clicked on Link Account) just before 8.35. Since then I get the Loading the next step for Nest message and wait.
  3. The message changed to Error just before 8.40.

Here follows the associated log. I masked what I think may be sensible as you warned me (thanks for that), hoping I did not masked too much. I also deleted some lines concerning sensors and automations, which should not be related to this issue.

2022-12-30 08:34:06.156 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated [IP of my HA machine] for /api/config/config_entries/flow using bearer token
2022-12-30 08:34:06.156 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow to [IP of my HA machine] (auth: True)
2022-12-30 08:34:06.537 INFO (MainThread) [aiohttp.access] [IP of my HA machine] [30/Dec/2022:07:34:06 +0000] "POST /api/config/config_entries/flow HTTP/1.1" 200 428 "http://[IP of my HA machine]:8123/config/integrations" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
2022-12-30 08:34:13.904 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated [IP of my HA machine] for /api/config/config_entries/flow/***chain-of-characters*** using bearer token
2022-12-30 08:34:13.904 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow/***chain-of-characters*** to [IP of my HA machine] (auth: True)
2022-12-30 08:34:13.906 INFO (MainThread) [aiohttp.access] [IP of my HA machine] [30/Dec/2022:07:34:13 +0000] "POST /api/config/config_entries/flow/***chain-of-characters*** HTTP/1.1" 200 429 "http://[IP of my HA machine]:8123/config/integrations" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
2022-12-30 08:34:19.661 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated [IP of my HA machine] for /api/config/config_entries/flow/***chain-of-characters*** using bearer token
2022-12-30 08:34:19.661 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow/***chain-of-characters*** to [IP of my HA machine] (auth: True)
2022-12-30 08:34:19.664 INFO (MainThread) [aiohttp.access] [IP of my HA machine] [30/Dec/2022:07:34:19 +0000] "POST /api/config/config_entries/flow/***chain-of-characters*** HTTP/1.1" 200 711 "http://[IP of my HA machine]:8123/config/integrations" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
2022-12-30 08:34:51.662 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/external/callback to [IP of my HA machine] (auth: False)
2022-12-30 08:34:51.662 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event data_entry_flow_progressed[L]: handler=nest, flow_id=***chain-of-characters***, refresh=True>
2022-12-30 08:34:51.665 INFO (MainThread) [aiohttp.access] [IP of my HA machine] [30/Dec/2022:07:34:51 +0000] "GET /auth/external/callback?code=***very-long-chain-of-characters*** HTTP/1.1" 200 182 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
2022-12-30 08:34:51.674 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated [IP of my HA machine] for /api/config/config_entries/flow/***chain-of-characters*** using bearer token
2022-12-30 08:34:51.674 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow/***chain-of-characters*** to [IP of my HA machine] (auth: True)
2022-12-30 08:35:12.173 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event recorder_5min_statistics_generated[L]>
2022-12-30 08:39:52.606 ERROR (MainThread) [aiohttp.server] Error handling request
2022-12-30 08:39:52.628 INFO (MainThread) [aiohttp.access] [IP of my HA machine] [30/Dec/2022:07:34:51 +0000] "GET /api/config/config_entries/flow/***chain-of-characters*** HTTP/1.1" 504 168 "http://[IP of my HA machine]:8123/config/integrations" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
2022-12-30 08:39:52.637 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated [IP of my HA machine] for /api/config/config_entries/flow/***chain-of-characters*** using bearer token
2022-12-30 08:39:52.637 DEBUG (MainThread) [homeassistant.components.http.view] Serving /api/config/config_entries/flow/***chain-of-characters*** to [IP of my HA machine] (auth: True)
2022-12-30 08:39:52.638 INFO (MainThread) [aiohttp.access] [IP of my HA machine] [30/Dec/2022:07:39:52 +0000] "DELETE /api/config/config_entries/flow/***chain-of-characters*** HTTP/1.1" 200 204 "http://[IP of my HA machine]:8123/config/integrations" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"

Please let me know in case I still left some confidential information on it. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

With 2022.7.0 my NEST integration fails - Configuration
So I tried recreating the 'Device Access' Project, that didn't solve it. Now I've started all over, making very sure that the ID's...
Read more >
Nest thermostat is offline - Google Support
Follow these steps if your Nest thermostat has been previously connected to your Wi-Fi network but disconnects repeatedly, or if it's offline in...
Read more >
Finally! A WORKING NEST Integration with Home Assistant ...
A COMPLETE GUIDE for connecting NEST to Home Assistant using Google Smart Device API and OAuth for Web Applications. This also uses the...
Read more >
Full Nest + Home Assistant Integration - HA 10 - YouTube
In this video I will walk you through the full process of setting up Nest with your Home Assistant interface. It is quite...
Read more >
Nest Cam (Battery). "Something went wrong" can't install
After 5 minutes, I get an error message "Something went wrong. ... All fine until the very end of the connection setup, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found