On a fresh install, I am having to switch to the Desktop App SDM method, from the older Web App method (I believe it was called) I used to use. During setup, I get all the way to Enter Project ID, which responds with “An unknown error occurred”, then my entire HA instance stops responding - I end up having to restart the core container.
Unfortunately because of this, the log also stops rolling. The last line before HA stops responding indicates that authentication was successful (I have logger set to debug for all Nest/SDM/OAuth components and helpers).
Can anyone please help with this given the little information I have; or confirm that they too are having this issue?
This is not a known issue. I am not familiar if home assistant supervised has anythin to do with it, but it may be worth seeing what versions of google-nest-sdm and grpcio are installed via pip3 freeze as a debugging hint.
You don’t get any log messages for the "An unknown error occurred”? That is surprising.
Hey, thanks for responding! I show:
google-nest-sdm==0.4.9
grpcio==1.31.0
I actually got a little further on the latest attempt. Last related log after Successfully Authenticated is: [homeassistant.components.nest.config_flow] Creating subscriber id …
I also see another error I hadn’t seen before (after HA becomes inaccessible), but don’t know if it’s at all related:
ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 676, in ping
await self._send_frame(message, WSMsgType.PING)
File "/usr/local/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 653, in _send_frame
self._write(header + message)
File "/usr/local/lib/python3.9/site-packages/aiohttp/http_websocket.py", line 663, in _write
raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport
as well as
[homeassistant.components.websocket_api.http.connection] [140455236334304] Connection closed by client
I assumed the latter error has to do with my web interface connection closing, but not sure.
I will set aiohttp to debug and test again.
Edit:
No aiohttp error this time. Also, I’ve realized Nest (with working config) is what broke my previous HA install - which is the whole reason I started fresh. Once I disabled Nest on the old, it stopped “locking up” 2 minutes into startup like it was before.
Hi, this definitely sounds like a huge issue so lets try to get to the bottom of this if you have time to collect more data.
There is one known issue where grpcio installation can slow down the system, when its compiling from source code rather than a wheel. And this would show that its installing the package:
logger:
default: info
logs:
homeassistant.util.package: debug
If it’s this, we may be able to get you a temporary workaround until we fix the root cause
However, if its saying “Creating subscriber id” then I would assume it is past that part already… Especially since you already have grpcio and google-nest-sdm installed.
I see absolutely nothing related in the logs after the subcriber ID part, aside from another of the websocket errors (not related?). However here is my docker exec -it homeassistant ps ax:
docker exec -it homeassistant ps -x returns as not an option
But some anecdotal things that might be of use:
Sometimes the HA container freezes until I restart it, but sometimes it comes back on it’s own for awhile. It stopped logging and immediately became unresponsive, after “Unknown error occurred”, for almost two minutes, then started logging again and was accessible. Then it froze again shortly after; eventually the container automatically restarted.
Supervisor log:
21-12-30 18:36:37 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config:
21-12-30 18:36:37 WARNING (MainThread) [supervisor.misc.tasks] Watchdog miss API response from Home Assistant
21-12-30 18:39:08 ERROR (MainThread) [supervisor.homeassistant.api] Error on call http://172.30.32.1:8123/api/config:
21-12-30 18:39:08 ERROR (MainThread) [supervisor.misc.tasks] Watchdog found a problem with Home Assistant API!
21-12-30 18:39:08 INFO (SyncWorker_1) [supervisor.docker.interface] Restarting ghcr.io/home-assistant/qemux86-64-homeassistant
Sometimes the logs will continue rolling in while HA is unresponsive, and other times logging will freeze as well
Ah, sorry, I overlooked that one. Including the auth one does not produce any additional logs, unfortunately. I’m really not sure why I’m not getting anything beyond Subscriber id - baffling.
Edit: for anyone else having this issue, I’m currently working around it by using HomeBridge to facilitate the connection to Nest.
What about turning the default to debug if that doesn’t help
My best guess is maybe the pubsub client worker thread is wedged, and maybe the event thread gets blocked, taking down home assistant. I can definitely look into adding timeouts if that is the case, in addition to fixing the root cause. Having some stack trace of what is “stuck” could help.
Hi there, I’m very sorry for the extended time away from this.
I have absolutely no clue what did it, but upon revisiting this and testing with full debug, it worked flawlessly. The only thing I can really think of is some security updates on the host… not even an HA update.
I’m happy to try to break it for more testing, but I’m shocked and happy it’s working (all of a sudden).