Problem checking config and restarting HASS

Hello,

I currently have a wired problem I can not find a point to search for the root cause.

Since I upgraded to 2021.12.6, I have wired issues restarting the server from UI and also checking the config. It always tells me, that it encounters an invalid domain custom_components.nodered and is not restarting. It simply adds this new log entry (counts up the occurences):

Logger: aiohttp.server
Source: loader.py:580
First occurred: 16:41:47 (9 occurrences)
Last logged: 16:54:51

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/core.py", line 29, in post
    errors = await async_check_ha_config_file(request.app["hass"])
  File "/usr/src/homeassistant/homeassistant/config.py", line 938, in async_check_ha_config_file
    res = await check_config.async_check_ha_config_file(hass)
  File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 129, in async_check_ha_config_file
    integration = await async_get_integration_with_requirements(hass, domain)
  File "/usr/src/homeassistant/homeassistant/requirements.py", line 58, in async_get_integration_with_requirements
    integration = await async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 566, in async_get_integration
    integration = await _async_get_integration(hass, domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 580, in _async_get_integration
    raise ValueError(f"Invalid domain {domain}")
ValueError: Invalid domain custom_components.nodered

I already updated the companion integration, all node-red palettes and also deactivated all node-red tabs. But the problem still persists. I also could not find a working solution searching through the forums and the web.

OK, found the solution… From my previos problem, a debug statement in configuration.yaml

custom_component.nodered: debug

survived and led to this error.

I found this “accidently” by grepping through the config folder of HASS on the shell. Unfortunately, the error message gives no hint, where to search, but from now on, I’ll more often use grep to nail down a problem :wink:

1 Like