Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during setup of component hassio #86622

Closed
LizzyTrickster opened this issue Jan 25, 2023 · 48 comments · Fixed by #94951
Closed

Error during setup of component hassio #86622

LizzyTrickster opened this issue Jan 25, 2023 · 48 comments · Fixed by #94951

Comments

@LizzyTrickster
Copy link

The problem

I've recently started having an issue with my HA instillation not starting properly.

The bare basics of the dashboard work but I cant access any of the addon-related pages and the "Supervisor" integration shows there's a fault.

The error first started on 2023.1.1, which i managed to clear by a mix of cli telling the supervisor to repair, reload and restart and also giving the QEMU VM that HA is running in a restart.

I then upgraded to 2023.1.7 (i had missed the intermediate updates as I didn't realise the supervisor wasn't working fully) where it worked for a while, but after a restart last night to solve some unrelated host issues the error has returned.

Any help would be muchly appreciated

What version of Home Assistant Core has the issue?

2023.1.7

What was the last working version of Home Assistant Core?

latest 2022 release or initial 2023 release

What type of installation are you running?

Home Assistant OS

Integration causing the issue

hassio

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error during setup of component hassio (components/hassio/handler.py)
`Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 253, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 587, in async_setup
    await repairs.setup()
  File "/usr/src/homeassistant/homeassistant/components/hassio/repairs.py", line 149, in setup
    await self.update()
  File "/usr/src/homeassistant/homeassistant/components/hassio/repairs.py", line 157, in update
    data = await self._client.get_resolution_info()
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 51, in _wrapper
    raise HassioAPIError(data["message"])
homeassistant.components.hassio.handler.HassioAPIError: System is not ready with state: setup`



When poking through the menus to get information, this error happened in `components/hassio/__init__.py`
`Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 561, in _async_setup_hardware_integration
    if (os_info := get_os_info(hass)) is None:
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 319, in get_os_info
    return hass.data.get(DATA_OS_INFO)
AttributeError: 'datetime.datetime' object has no attribute 'data'`

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/supervisor, mind taking a look at this issue as it has been labeled with an integration (hassio) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of hassio can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign hassio Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


hassio documentation
hassio source
(message by IssueLinks)

@LizzyTrickster
Copy link
Author

An update to this: after telling Home assistant to restart through the developer options, everything is fully functional again.

@LizzyTrickster
Copy link
Author

Another update: I suspect it's some sort of race condition when the host (in this case, the aforementioned QEMU VM) first boots up, supervisor doesn't get started in time for HA to recognise it properly. After then telling HA to restart through the dev menu it all works fully again

@lgwapnitsky
Copy link

I'm still receiving this, even with restarts from the menu. I'm also running this as a QEMU VM under proxmox

@SpartanTech
Copy link

Having the same issue as well. Becoming more frequent now, after the host boots up, home assistant always has to be restarted last. Add-ons and everything else do not show up until I perform this step. Definitely an issue of home assistance starting too fast or too late

@bogsen
Copy link

bogsen commented Feb 10, 2023

Same issue here, but on a Raspberry Pi 4 (booting from USB SSD). Restarting Home Assistant from Settings -> System -> Restart fixes it and makes addons show up again, but the issue occurs again after each reboot.

@malosaa
Copy link

malosaa commented Feb 15, 2023

Same issue on all my servers running different versions of Virtualbox.
When i start all of them they fail with this message

homeassistant.components.hassio.handler.HassioAPIError: System is not ready with state: setup

After going into the homeassistant gui i press restart and works again.

@wormiedk
Copy link

I started getting this in release 2023.3.0b0

This is what is in the logs after system reboot:

Logger: homeassistant.setup
Source: components/hassio/handler.py:51
First occurred: 08:42:14 (1 occurrences)
Last logged: 08:42:14

Error during setup of component hassio
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 256, in _async_setup_component
    result = await task
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 586, in async_setup
    await repairs.setup()
  File "/usr/src/homeassistant/homeassistant/components/hassio/repairs.py", line 149, in setup
    await self.update()
  File "/usr/src/homeassistant/homeassistant/components/hassio/repairs.py", line 157, in update
    data = await self._client.get_resolution_info()
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 51, in _wrapper
    raise HassioAPIError(data["message"])
homeassistant.components.hassio.handler.HassioAPIError: System is not ready with state: setup

Restarting home assistant resolves the issue

@malosaa
Copy link

malosaa commented Mar 9, 2023

Form e it still happens on all versions of home assistant and don't know whats causting this.

1 server running in VIRTUALBOX windows 11
1 server running on proxmox
1 server running on VIRTUALBOX windows 10

All of hem i need to restart twice before it works again.
This only happens when restarting /virtualbox/proxmox container/ and home assistant reboots.

@ZTHawk
Copy link

ZTHawk commented Mar 18, 2023

I have the same issue.
After restart of host, I need to reboot HA once to be fully functional.

@malosaa
Copy link

malosaa commented Mar 18, 2023

i even have now 2 instances running on proxmox, same issue.
lets hope they fix this, as the strange thing is it says that hassio failed to load, while my add-ons are still working... but not selectable in the homeassistant gui...

@SpartanTech
Copy link

It's a reoccurring problem still. Reproducable 100pct of the time. Every reboot of the machine requires a separate 'restart home assistant' action to get it working right. All my raspberry pis have the issue

@malosaa
Copy link

malosaa commented Mar 26, 2023

Its an issue need to be solved, as how can this system be reliable then ?

Indeed you can manual restart HASS and it works, but not if im not at home...

And of course this only happens if u do an update or if you do a full system reboot, or you get for example a power issue and your main host goes down, and it restarts.

Happening on:

  • proxmox instance
  • virtualbox instance (windows 11)
  • virtualbox instance (windows 10)

All of them running last version and last HASSOS version besides the windows 11 one.

If there is a way to create an automation that triggers on that HASSIO failed to load and will trigger an restart that would be good for the time being.

The devs need to fix this asap as this is annoying !
if we all click in the top post on the thumbs up icon the devs will be notified and know about this issue.

@woody4165
Copy link

woody4165 commented Apr 1, 2023

Hi

I'm having same issue, HA installed in a VM on Proxmox, both on latest version as today.

It does not happen on every HA restart.
When it happens, in Settings the item "Add-ons" it's missing

Screenshot 2023-04-01 171049

Logger: homeassistant
Source: components/hassio/__init__.py:320
First occurred: 08:47:06 (1 occurrences)
Last logged: 08:47:06

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 560, in _async_setup_hardware_integration
    if (os_info := get_os_info(hass)) is None:
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 320, in get_os_info
    return hass.data.get(DATA_OS_INFO)
AttributeError: 'datetime.datetime' object has no attribute 'data'

I'm not able to find any solution.

Any suggestion?

Thanks

@SpartanTech
Copy link

SpartanTech commented Apr 1, 2023

Error came back with the latest update as well. It's either an issue of updates not applying correctly or they made a change that reverts the fix. The last two weeks of March my boxes have been fine even after restarts (previously had issues all of January and February). After updating to this latest update, restarts bring back the error

I'm about to stop updating once everything is stable. The updates, or maybe even how they apply the updates are not stable at all. What's funny is the supervised unsupported installs are actually more reliable than my hassOS boxes for friends. There are a lot of people on other communities having the same issue, they just don't report.

@SpartanTech
Copy link

HA

Does your date time and hassio error go away after you manually restart home assistant once it's half up?

@woody4165
Copy link

woody4165 commented Apr 1, 2023

I've never tried to manually restart home assistant once it's half up.

After a normal restart it can happens that I don't get the error (and Settings->Add-ons shows up), I don't know if it's 50-50 of times

@mogim0gi
Copy link

mogim0gi commented Apr 2, 2023

Have the same issue @home-assistant/supervisor please reply

@mweyand619
Copy link

Hi

I'm having same issue, HA installed in a VM on Proxmox, both on latest version as today.

It does not happen on every HA restart. When it happens, in Settings the item "Add-ons" it's missing

Screenshot 2023-04-01 171049

Logger: homeassistant
Source: components/hassio/__init__.py:320
First occurred: 08:47:06 (1 occurrences)
Last logged: 08:47:06

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 560, in _async_setup_hardware_integration
    if (os_info := get_os_info(hass)) is None:
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 320, in get_os_info
    return hass.data.get(DATA_OS_INFO)
AttributeError: 'datetime.datetime' object has no attribute 'data'

I'm not able to find any solution.

Any suggestion?

Thanks

I have this same issue

@malosaa
Copy link

malosaa commented Apr 4, 2023

Correction: For me: this only happens if u fully shutdown HASS and start it up again, but manual restart does work normal.

@woody4165
Copy link

this only happens if u fully shutdown HASS and start it up again, but manual restart does work normal.

Not for me, it happens to me when I do a restart (some times).
I haven't checked what happens when I do a shutdown

@malosaa
Copy link

malosaa commented Apr 4, 2023

this only happens if u fully shutdown HASS and start it up again, but manual restart does work normal.

Not for me, it happens to me when I do a restart (some times). I haven't checked what happens when I do a shutdown

True, i corrected my message above. I need to see what happens if tomorrow the new HASS version get released, see if it also happens if we update.

@mweyand619
Copy link

Hi

I'm having same issue, HA installed in a VM on Proxmox, both on latest version as today.

It does not happen on every HA restart. When it happens, in Settings the item "Add-ons" it's missing

Screenshot 2023-04-01 171049

Logger: homeassistant
Source: components/hassio/__init__.py:320
First occurred: 08:47:06 (1 occurrences)
Last logged: 08:47:06

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 560, in _async_setup_hardware_integration
    if (os_info := get_os_info(hass)) is None:
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 320, in get_os_info
    return hass.data.get(DATA_OS_INFO)
AttributeError: 'datetime.datetime' object has no attribute 'data'

I'm not able to find any solution.

Any suggestion?

Thanks

I seemed to have solved my issue with a weird fix. Based on another suggestion I added a small delay to my docker.service, I used the 'ExecStartPre=' field to sleep for a few seconds. This seems to allow HASS to boot correctly on first startup. Without it I will need to reboot HASS after the VM comes up.

@mogim0gi
Copy link

mogim0gi commented Apr 4, 2023 via email

@woody4165
Copy link

I seemed to have solved my issue with a weird fix. Based on another suggestion I added a small delay to my docker.service, I used the 'ExecStartPre=' field to sleep for a few seconds. This seems to allow HASS to boot correctly on first startup. Without it I will need to reboot HASS after the VM comes up.

I'm usinng HA in Proxmox on a VM.
Do your solution apply also to me?

@mweyand619
Copy link

I seemed to have solved my issue with a weird fix. Based on another suggestion I added a small delay to my docker.service, I used the 'ExecStartPre=' field to sleep for a few seconds. This seems to allow HASS to boot correctly on first startup. Without it I will need to reboot HASS after the VM comes up.

I'm usinng HA in Proxmox on a VM. Do your solution apply also to me?

I can't say for sure this will fix the issue but I am also running HA in a Proxmox VM

@malosaa
Copy link

malosaa commented Apr 6, 2023

I can verify during the upgrade to 2023.4 on proxmox-windowsVirtualbox i don't get this error anymore.
Now i only get it when fully shutdown the vm or container and restarting it. so not after an upgrade..

@SpartanTech
Copy link

SpartanTech commented Apr 8, 2023

Updated to latest version, still having the issue. I'm amazed something as critical of a component as hassio not being reliable hasn't been noticed by any of the repo admins for this long. I wonder which commit caused this.

Might finally be time to install visual studio and get back into programming. I've never been that great with asynchronous or parallel algorithms though.

@paulovitin
Copy link

I've been facing this error for 4 weeks. I continued restarting my home assistant to get things working again. I updated to the last version, but nothing was fixed.

@malosaa
Copy link

malosaa commented Apr 11, 2023

There will be new supervisor updates this month, they did announce it in the last release update stream.
lets wait for that

@paulovitin
Copy link

There will be new supervisor updates this month, they did announce it in the last release update stream. lets wait for that

I will pray for that. It sucks to reset the home assistant many times a day.

@Marcos-kp
Copy link

Same problem for me. This makes my current setup impossible to debug, since my instance crashes and I am unable to find the previous logs (since I don't have access to any add-on like file editor or samba share). I am looking forward a lot for a fix.

@maorisra
Copy link

Same here.
I've installed the supervisor on docker if it's change anything.
The supervisor is working properly for few hours only after restarting the host+the container and than fails again.
Please assist.

@bibitocarlos
Copy link

Same here with a PI4

@epenet
Copy link
Contributor

epenet commented May 5, 2023

See #92569

@totalitarian
Copy link

Same issue here running in proxmox

@SpartanTech
Copy link

Definitely something wrong with home assistant. I've asked friends who have home assistant on different machines as well and they experience this issue but they just never report it because their box doesn't reboot as often.

Personally experience the same thing on many different host types. HassOS is frequently the most troublesome, the only machine that hasn't given me issues is a random supervised setup.

I'd estimate that a third of home assistant users would experience the same issue if they reboot their machine, a majority of them just either don't reboot or havent updated to the latest home assistants

@epenet
Copy link
Contributor

epenet commented May 25, 2023

AttributeError: 'datetime.datetime' object has no attribute 'data' should have been fixed in 2023.5.2 via #92569

If the issue is still occuring after 2023.5.2, then you should post fresh logs.

@dankarization
Copy link

image
I had the same problem for a month's, but found some workaround- I used to check if addons "running" sensors were unavailable (binary_sensor.something_running), and if so, automatically restarted HA. In 99% of the time 1 restart was enough, rarely 2, but eventually everything was working fine + I rarely restart my HA instance, so a little wait was not a problem

BUT- Since 2023.6 release Supervisor almost never starts without an issue. Even if addons are working and showing inside HA, their running sensors almost always shows as Unavailable. Now I have no idea how to fix this automatically

@dankarization
Copy link

dankarization commented Jun 13, 2023

Logger: homeassistant.setup
Source: components/hassio/handler.py:52
First occurred: 15:46:42 (1 occurrences)
Last logged: 15:46:42

Error during setup of component hassio
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 286, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 639, in async_setup
    await issues.setup()
  File "/usr/src/homeassistant/homeassistant/components/hassio/issues.py", line 300, in setup
    await self.update()
  File "/usr/src/homeassistant/homeassistant/components/hassio/issues.py", line 308, in update
    data = await self._client.get_resolution_info()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper
    raise HassioAPIError(data["message"])
homeassistant.components.hassio.handler.HassioAPIError: System is not ready with state: setup

My logs

@ghost
Copy link

ghost commented Jun 19, 2023

Getting the same error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 286, in _async_setup_component
    result = await task

Also not seeing my host hardware info in Setting > Hardware menu
hmm

@flyize
Copy link
Contributor

flyize commented Jun 19, 2023

I'm getting this error every time the Unraid VM restarts. A restart from Dev Tools temporarily fixes it. Do you need full logs @epenet?

@hundsboog
Copy link

Same here with an UnRaid VM. Hopefully there will be a fix soon. Keep up the good work, dear devs!

@Rothammel
Copy link

same issue on proxmox here:

image

@flyize
Copy link
Contributor

flyize commented Jun 29, 2023

Guys, look up a couple of comments. It's being fixed in .3

@LeChat109
Copy link

Guys, look up a couple of comments. It's being fixed in .3

nope, .3 wont fix the problem. worse, in my case, the .3 created the problem
image

@sbyx
Copy link
Contributor

sbyx commented Jul 7, 2023

Same issues here core-2023.6.3 see duplicate issue above. Also still exists in 2023.7.1.

@epenet
Copy link
Contributor

epenet commented Jul 10, 2023

Please stop trying to revive an old issue.
The original issues (unhandled exceptions) are fixed.

What you have now is no longer an unhandled exception and should be a new issue instead.

@home-assistant home-assistant locked as off-topic and limited conversation to collaborators Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.