home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.73k stars 30.85k forks source link

NEST integration not loading and cannot be removed either #127039

Closed dxfoxd closed 1 month ago

dxfoxd commented 1 month ago

The problem

The NEST integration is not loading and cannot be removed (in an attempt to reinstall to resolve the issue).

What version of Home Assistant Core has the issue?

core-2024.11.0.dev202409290232

What was the last working version of Home Assistant Core?

Unknown

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

home-assistant_2024-09-29T14-37-39.437Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-09-29 16:34:16.246 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('homeassistant.components.nest',) in /usr/src/homeassistant/homeassistant/loader.py, line 1067: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue

2024-09-29 16:34:16.279 ERROR (MainThread) [homeassistant.setup] Setup failed for 'nest': Unable to import component: Error relocating /usr/local/lib/python3.12/site-packages/grpc/_cython/cygrpc.cpython-312-arm-linux-musleabihf.so: __wrap_memcpy: symbol not found

Additional information

Problem was detected after updating core container, not sure if it was working before that. Also Google integration stopped working but after I few attempts I succeeded in removing the Google integration. Nest however cannot be removed fo some reason.

home-assistant[bot] commented 1 month ago

Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (nest) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `nest` 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 nest` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nest documentation nest source (message by IssueLinks)

allenporter commented 1 month ago

@mib1185 Hard to interpret this as blocking in event loop since its happening while doing normal import. Let me know if you have a different interpretation or way to know whats actually happening, but it seems spurious to me.

@dxfoxd I've seen these types of issues with specific arm hardware and grpc like in https://github.com/home-assistant/core/issues/56669 and these types of issues are very hard to track down, especially when using a core install or a container install since Home Assistant does not control the entire environment. I see you are running a dev build -- so perhaps that includes https://github.com/home-assistant/core/pull/126947 ? You could manually downgrade to 1.63.0 and see if the issue is present or not to narrow down. Adding @cdce8p for visibility

mib1185 commented 1 month ago

my consideration was just based on the message [homeassistant.util.loop] Detected blocking call to import_module with args ('homeassistant.components.nest',) , but tbh did not checked it more in detail :see_no_evil:

dxfoxd commented 1 month ago

Hmm, I can't remember if and why I installed the HA dev build, that was years ago. Can this be the cause of the error? FYI, I'm running HA in a docker container on a RPi 4B. I'm using the image ghcr.io/home-assistant/raspberrypi4-homeassistant:latest. Would it be wise to replace the image with ghcr.io/home-assistant/home-assistant:stable? Actually, besides updating the images regularly I didn't face any issued for months and my detailed knowledge has somewhat faded. A 'dirty' fix to force uninstall would be OK too, since the only device that uses the Nest integration will be removed in a few weeks.

Art.

allenporter commented 1 month ago

@dxfoxd yes, running a release image may help as a workaround or to confirm that its a problem with a specific version.

dxfoxd commented 1 month ago

I create a new container with the 'normal' docker build. This runs normally without errors related to NEST. I have to see in the next period what is not working (and why I choose the dev build years ago). Anyway, glad it is resolved.

cdce8p commented 1 month ago

@dxfoxd The latest dev image 2024.11.0.dev202410040230 should be fixed. If you've got some time it would be awesome if you could try that again. Just to be sure it works for the next release.