Hacs fails to load

For about a month now, HACS won’t load. There is no update available and reloading doesn’t work.

I have exactly the same problems as
in this thread
With the exception that I can’t update

The log only shows this info:


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 "/config/custom_components/hacs/__init__.py", line 220, in async_setup_entry
    setup_result = await async_initialize_integration(hass=hass, config_entry=config_entry)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/__init__.py", line 206, in async_initialize_integration
    await async_try_startup()
  File "/config/custom_components/hacs/__init__.py", line 193, in async_try_startup
    startup_result = await async_startup()
                     ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/__init__.py", line 171, in async_startup
    hass.config_entries.async_setup_platforms(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

I would like to reinstall HACS without losing my custom integrations.
Does anyone have a clue what to do next?

Thanks in advance!

I had the same problem. I tried removing and adding the HACS integration a few times also re-registering on git. Still the same.

I assume if you will go into HACS on the sidebar you will see that there is an update available but trying to update will fail.

This is what I ended up doing:

  • Remove the HACS integration
  • Restart HA
  • Install HACS again using the SSH add-on, as in in this link: Download | HACS
  • Add the HACS integration and finish the configuration

You should now have the latest HACS with no errors.

For me I only had one integration and it was not affected.

I hope that helps.

2 Likes

HACS only downloads and installs custom integrations (and keeps a tab on upgrades). Reinstalling HACS does not affect existing custom integrations.

2 Likes

Hi!

Just want to chip in with an alternative (slightly simpler) solution. Sorry if its not at all related.

I had problem that HACS seemed to load fine, but whenever trying to open a new plugin, it just remained on the loading page.

I was able to fix the problem by (re)-configuring the hacs under integrations, and checking all boxes. They are reported as mandatory on the documentation section, so maybe introduced after my initial installation…?

Anywho, consider trying this if experiencing similar issues.