Unable to initialize HACS

Hi all!

I have just updated Home Assistant Core to 2025.1.0. After rebooting, HACS (2.0.1) isn’t initialized anymore. When I manually try to reload HACS, I see the following in the log:

2025-01-06 15:32:52.341 CRITICAL (MainThread) [custom_components.hacs] <HacsData restore> [The repo id for music-assistant/hass-music-assistant is already set to 911125621] Restore Failed!
Traceback (most recent call last):
  File "/config/custom_components/hacs/utils/data.py", line 222, in restore
    self.async_restore_repository(entry, repo_data)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/utils/data.py", line 270, in async_restore_repository
    self.hacs.repositories.set_repository_id(repository, entry)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/base.py", line 290, in set_repository_id
    raise ValueError(
    ...<2 lines>...
    )
ValueError: The repo id for music-assistant/hass-music-assistant is already set to 911125621
2025-01-06 15:32:52.346 ERROR (MainThread) [custom_components.hacs] HACS is disabled - restore
2025-01-06 15:33:01.077 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.components.main['washerOperatingState']['remainingTime']['value'] }}'
2025-01-06 15:33:01.077 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.components.main['washerOperatingState']['remainingTime']['value'] }}'
2025-01-06 15:33:01.077 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.components.main['washerOperatingState']['remainingTime']['value'] }}'
2025-01-06 15:34:01.064 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{ value_json.components.main['washerOperatingState']['remainingTime']['value'] }}'
2025-01-06 15:34:03.874 CRITICAL (MainThread) [custom_components.hacs] <HacsData restore> [The repo id for music-assistant/hass-music-assistant is already set to 911125621] Restore Failed!
Traceback (most recent call last):
  File "/config/custom_components/hacs/utils/data.py", line 222, in restore
    self.async_restore_repository(entry, repo_data)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/utils/data.py", line 270, in async_restore_repository
    self.hacs.repositories.set_repository_id(repository, entry)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hacs/base.py", line 290, in set_repository_id
    raise ValueError(
    ...<2 lines>...
    )
ValueError: The repo id for music-assistant/hass-music-assistant is already set to 911125621
2025-01-06 15:34:03.878 ERROR (MainThread) [custom_components.hacs] HACS is disabled - restore

I have tried several things and searched for solutions elsewhere, but can’t find the solution to fix this. Any help guiding me into the right direction would be appreciated :slight_smile:

https://community.home-assistant.io/t/hacs-doesnt-show-downloaded-integrations/823031/3?u=tom_l

1 Like

Thanks for the solution Tom, there are still a few question left for me.

Since I always wait a few weeks with updating my Home Assistant, since it costs me weeks of troubleshootin in the past.

HACS Stopped working out of the blue, with this message; ‘[The repo id for music-assistant/hass-music-assistant is already set to 476357279] Restore Failed!’

I didnt update Home Assistant, nor did I reinstall or update HACS. I never installed Music-assistant, I don’t even know what it is. I have HAOS on a NUC, because I want to have it as stable as possible. No reverse proxy/hypervisor/shared hardware.

I see a lot of solutions here, but I like to have a RCA on this, or at least some background information on how this is possible. HA became to important to fail for many users. A RCA is a root cause analysis, professional IT organisation make it mandetory after big outages, and I think HA would be wise to follow up on this.

I’d like feedback from the staff… This is the second time within a year that HA stopped working out of the blue.

3 Likes

HACS is third party, Help - HACS

Right @fleskefjes , but the @Lecturer555 has a point. He describes exactly also my problem at the moment. If anyone receives a feedback what happened he may post it here…

1 Like

I completely agree. I’m getting apprehensive of still updating because I had to roll back a few times during the past year.
Also, this application is used by non-IT people like myself. You cannot expect normal users to have to go and change files to take lines out related to ‘music assistant’ which I never installed in the first place.

1 Like

I have to completely agree on the “HA became to important to fail for many users.”

I also, am afraid to update nowadays. More frequently than not, I’m in a pickle; pressed between a stone and an hard place. If I update I’ll get problems, If I don’t, something will eventually stop working.