2022.8.0 completely breaks Home Assistant

In the logs I see that the agent is started again and again, but there is no more information. Probably it crashes.

This messages gets renewed every few seconds:
2022-08-04 19:40:05.250 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration...

After restoring the installation of 2022.7.7 it works again.

Anything I can do?

Maybe you could try to remove the custom integration (how many of that do you have?) and retry the upgrade process.

1 Like

It seems like the title of this post should be “2022.8.0 breaks due to custom component”, because your issue isn’t with HA directly, it’s with a custom component which likely wasn’t created by the HA folks. That being said, somewhere around those log entries should give you information about which component is complaining, go check to see if there is an update to it that is required on 2022.8.0 or ask the dev to investigate why it’s breaking your HA in the first place.

1 Like

I removed the folder custom_components and blueprints temporarily by moving them into a different folder. Now I don’t get any logs (home-assistant.log is empty).

Launchd logs:

2022-08-05 07:49:13.742554 (gui/501/org.homeassistant [46640]) <Notice>: exited due to exit(1)
2022-08-05 07:49:13.742584 (gui/501/org.homeassistant [46640]) <Notice>: service state: exited
2022-08-05 07:49:13.742590 (gui/501/org.homeassistant [46640]) <Notice>: internal event: EXITED, code = 0
2022-08-05 07:49:13.742596 (gui/501 [100005]) <Notice>: service inactive: org.homeassistant
2022-08-05 07:49:13.742604 (gui/501/org.homeassistant [46640]) <Notice>: service state: not running
2022-08-05 07:49:13.742614 (gui/501/org.homeassistant) <Notice>: Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
2022-08-05 07:49:13.742635 (gui/501/org.homeassistant) <Notice>: internal event: WILL_SPAWN, code = 0
2022-08-05 07:49:13.742650 (gui/501/org.homeassistant) <Notice>: service state: spawn scheduled
2022-08-05 07:49:13.742654 (gui/501/org.homeassistant) <Notice>: service throttled by 10 seconds

I also reinstalled HA many times.

Look, I caught an error:

2022-08-05 11:50:27.658 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
  File "/Users/server/Steuerung/homeassistant/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/__main__.py", line 191, in main
    exit_code = runner.run(runtime_conf)
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/runner.py", line 119, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/opt/homebrew/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/runner.py", line 101, in setup_and_run_hass
    hass = await bootstrap.async_setup_hass(runtime_config)
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/bootstrap.py", line 143, in async_setup_hass
    await async_from_config_dict(config_dict, hass) is not None
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/bootstrap.py", line 256, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/bootstrap.py", line 532, in _async_set_up_integrations
    recorder.async_initialize_recorder(hass)
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/recorder.py", line 22, in async_initialize_recorder
    from homeassistant.components.recorder import const, models
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/components/recorder/__init__.py", line 23, in <module>
    from . import statistics, websocket_api
  File "/Users/server/Steuerung/homeassistant/lib/python3.9/site-packages/homeassistant/components/recorder/statistics.py", line 17, in <module>
    from sqlalchemy import bindparam, func, lambda_stmt, select
ModuleNotFoundError: No module named 'sqlalchemy'

After I install sqlalchemy it still crashes.
I can’t really see the cause, because the log is overwritten as soon as HA restarts.

Your previous log is not lost, it exists as home-assistant.log.1

image

That is a good point.

But it is empty. I guess my error just appeared once. But how can it crash so early?

This is certainly not the proper way to disable custom components.

What for do you install SQLAlchemy for? And how did you install it?

Furthermore which installation method of HA is used and on what type of hardware is it running?

With the sparse information about your setup you are revealing here pinning down the source of the problem(s) can only be a guessing at best.

Sorry for that, I just realized I didn’t post my method:

My only error message was regarding SQL, so I tried that. But since it is in an venv I can revert back.

I just don’t know how to bugfix this - it simply doesn’t work anymore. It is reproducible, but without logs …

Could it be related to the new Bluetooth feature?

If it’s bailing before any logs appear, it’s very early in the HA startup process.

It’s most likely related to your install process which doesn’t appear to be a supported install method from what I can tell. You’re most likely on your own on this one

Any idea how I can disable the new Bluetooth integration? I highly suspect this. I mean for 6 months it worked.

I don’t believe you can, you can see if it’s in default config. You could try to put empty py files with a manifest in it replacing the Bluetooth integration.

But something has fundamentally changed, my installation method is not very exotic.

I can’t just abandon Home Assistant because of that!

I understand, but as it looks, you’re the one with the most knowledge on that os/setup… all you can really do is make a debug version and latch on to the process as it starts. Hopefully you can attach before it crashes. The debug integration doesn’t start exactly on startup, it’s close though.

$ pip install sqlalchemy fnvhash

worked for me. My manual development environment (venv) was broken in the same way. Make sure you’re running pip install inside your Python environment.

I would never use a Core install for my production system. :man_shrugging:

2 Likes

Yea, it sounds like something to do with your recorder/database/SQL. Maybe it wasnt running when you restarted or updated. For whatever reason, my MariaDB add-on did not automatically start as it was supposed to after the last two updates.

1 Like

Thanks a lot, I will try that.

For Mac users there isn’t an alternative to a Core installation. Docker doesn’t work with USB, VM are inefficient.

Again thanks for that hint. I can confirm it works now.

Seems like fnvhash was missing on my system (venv).

It is in fact a bug in HA. There are missing requirements: