core: Supervisor integration fails to load

The problem

Both on 2023.4.0b0 and 0b2

What version of Home Assistant Core has the issue?

Home Assistant 2023.4.0b2

What was the last working version of Home Assistant Core?

Home Assistant 2023.3.1

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Supervisor

Link to integration documentation on our website

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

Diagnostics information

home-assistant_2023-03-31T03-41-45.513Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

I uploaded the log under diagnostic data

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 65 (1 by maintainers)

Most upvoted comments

image I commented at line 66 and everything is back to normal

I used a new installation of 2023.4, and I still have this problem. kvm version haos.

Error setting up entry Supervisor for hassio
Logger: homeassistant.config_entries
Source: components/hassio/handler.py:472
First occurred: 10:54:05 (1 occurrences)
Last logged: 10:54:05
Error setting up entry Supervisor for hassio

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 625, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 215, in async_config_entry_first_refresh
    await self._async_refresh(
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 933, in _async_refresh
    await self.hassio.refresh_updates()
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 35, in _wrapper
    data = await funct(*argv, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 472, in send_command
    request = await self.websession.request(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
  File "/usr/local/lib/python3.10/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError

How to fix this, I’m running hass supervised. I guess I have to edit this in the docker container? Which one?

Indeed, edit the file within the docker container: sudo docker exec -it hassio_supervisor /bin/bash Use vi to edit the file: vi /usr/src/supervisor/supervisor/api/os.py

To add: am having the exact same issue. The “addons” page is also not willing to load. Inside the logs of the Supervisor container I do find some hints that doubletake is causing issues (but cannot determine if this is also the reason why the supervisor is causing issues). Relevant logs:

23-04-01 07:38:32 INFO (SyncWorker_2) [supervisor.docker.interface] Cleaning addon_c7657554_double-take application
23-04-01 07:38:33 INFO (SyncWorker_1) [supervisor.docker.addon] Starting Docker add-on c7657554/amd64-addon-double-take with version 1.13.1
23-04-01 07:38:33 INFO (MainThread) [supervisor.store] Loading add-ons from store: 102 all - 0 new - 0 remove
23-04-01 07:38:33 INFO (MainThread) [supervisor.store] Loading add-ons from store: 102 all - 0 new - 0 remove
23-04-01 07:38:33 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 185, in block_bad_requests
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 201, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 268, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/middleware/security.py", line 280, in core_proxy
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 62, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/os.py", line 66, in info
    ATTR_DATA_DISK: self.sys_os.datadisk.disk_used.id
AttributeError: 'NoneType' object has no attribute 'id'

I have the same issue Version: 2023.3.3

AD9893DA-E570-401D-AF11-1F92FBF2BAC1

I have the same issue. In Addition the back-up List is Not loading, so no way to roll back.

I have PiHole in my network. Manually setting DNS to 1.1.1.1 in HomeAssitant network settings and restarting it fixes the problem.

Thanx!

I’m having this exact same issue with 2023.9.2 image

This is a brand new install on a brand new Hyper-V machine using the stock-supplied VHDX

image

Logger: homeassistant.config_entries
Source: components/hassio/handler.py:540
First occurred: 5:48:56 PM (1 occurrences)
Last logged: 5:48:56 PM

Error setting up entry Supervisor for hassio
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 668, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 257, in async_config_entry_first_refresh
    await self._async_refresh(
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 977, in _async_refresh
    await self.hassio.refresh_updates()
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 37, in _wrapper
    data = await funct(*argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 540, in send_command
    request = await self.websession.request(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
asyncio.exceptions.CancelledError: Global task timeout

Any suggestions on how to proceed?

For anyone who has this problem and you are running pihole, please try to bypass the pihole DNS and try as mentioned here: https://github.com/home-assistant/core/issues/99862.

Props to https://github.com/SalvatoreITA for the solution!

image I commented at line 66 and everything is back to normal Thanks @hoanglongutc !!!

I connected to the hassio_supervisor container console via Portainer, found the file cd /usr/src/supervisor/supervisor/api/os.py I commented out line No. 66, restarted the server completely. Everything works again. Thank you.

Hi everyone! Today I had upgrade Debian 11 to 12 on my Raspberry Pi 4. After upgrade I had got this problem. Home Assistant 2023.8.4 Supervisor 2023.08.3 Operating System Debian GNU/Linux 12 (bookworm)

The method described above still working. I have solved my issue.

The issue got fixed in Home Assistant Release 2024.4 for me.

The only solution currently is to reinstall the whole system and hopefully things get installed correctly. But it breaks on the next update, so the more realistic solution is just deal with it and manually restart home assistant after supervisor fails to load

thank you very much - it really works! sudo docker exec -it hassio_supervisor /bin/bash vi /usr/src/supervisor/supervisor/api/os.py os_py

Same problem Home Assistant 2023.3.6 IMG_20230402_175933

Same problem Home Assistant 2023.3.6 Frontend: 20230309.1 - latest - running in docker on raspbian

Had same issue and doing a rebuild worked for me.

I have HASS OS in a VM and I simply entered ´ha core rebuild´ and it worked for me. All missing addons funcitnality and hacs repositories appeared after that.

Good luck!