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
71.13k stars 29.8k forks source link

Roborock integration failed #122957

Open jncanches opened 1 month ago

jncanches commented 1 month ago

The problem

Adding a roborock integration (the stock one, not the hacs one) leads to this error

Le flux de configuration n'a pas pu être chargé: {"message":"Invalid handler specified"}

Matching logs:

2024-07-31 16:27:56.701 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module with args ('homeassistant.components.roborock.config_flow',) inside the event loop by integration 'config' at homeassistant/components/config/config_entries.py, line 179: return await super()._post_impl(request, data) (offender: /usr/src/homeassistant/homeassistant/loader.py, line 1296: return importlib.import_module(f"{self.pkg_path}.{platform_name}")), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+config%22
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
    handle._run()
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 172, in post
    return await self._post_impl(request, data)
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 179, in _post_impl
    return await super()._post_impl(request, data)

2024-07-31 16:27:56.702 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration roborock: cannot import name 'RoborockCategory' from 'roborock.code_mappings' (/config/deps/lib/python3.12/site-packages/roborock/code_mappings.py)

What version of Home Assistant Core has the issue? core-2024.7.4

What was the last working version of Home Assistant Core? core-2024.7.4

What type of installation are you running? Home Assistant OS

Integration causing the issue roborock

Link to integration documentation on our website https://www.home-assistant.io/integrations/roborock/

Diagnostics information No response

Example YAML snippet No response

Anything in the logs that might be useful for us? No response

Additional information No response

home-assistant[bot] commented 1 month ago

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

Code owner commands Code owners of `roborock` 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 roborock` 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)


roborock documentation roborock source (message by IssueLinks)

mib1185 commented 1 month ago

please fillout the issue template, it is on purpose so help us to help you, thx :+1:

jncanches commented 1 month ago

please fillout the issue template, it is on purpose so help us to help you, thx 👍

Oh I am sorry. Don't know what hapenned, I have edited the issue to format the code and the data from the template was deleted.

Fixed !

issue-triage-workflows[bot] commented 4 weeks ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jncanches commented 4 weeks ago

The issue is still valid with 2024.8.1 version of HA. But now there is only one line error in logs

ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration roborock: No module named 'roborock.version_1_apis'

Lash-L commented 3 weeks ago

Seemingly you have the wrong version of the base python package installed. Please make sure the following are true:

You don't have Roborock installed in hacs

You have no folder for Roborock in config/custom components or Python-Roborock in config

If you are sure about both of these I would try uninstalling Roborock and reinstalling it after a reboot

jncanches commented 3 weeks ago

Thanks for your reply. I have triple checked that I have not any kind of Roborock HACS component. I uninstalled it several weeks ago. I have uninstalled Xiaomi Cloud Map extractor HACS component, just in case. I reboot, and I have the same error. Maybe I can re-install HACS version and remove it again ?

jncanches commented 3 weeks ago

Just tried to re-install HACS version, reboot, configure, remove, reboot and tried the "official" one and ... no luck

issue-triage-workflows[bot] commented 1 week ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

jncanches commented 1 week ago

Problem still present on 2024.9 version of HA...