HACS Failed to load : the repo id is already set. All frontend custom integrations unloaded

I have a few HA setups, and from time to time I see this duplicated ID in hacs.repository log. It’s very frustating to edit this file manually. All my custom repos stop working when this happens since HACS failed to load…

Am I doing something wrong to cause this?
Can I prevent this file from being updated?

Is there an easy way to move my integrations downloaded from HACS to my local installation to work even if HACS fails?

I’ve fixed this many times across 10 HA instances

This error originated from a custom integration.

Logger: custom_components.hacs
Source: custom_components/hacs/utils/data.py:222
integration: HACS (documentation, issues)
First occurred: 04:46:20 (59 occurrences)
Last logged: 18:53:44

<HacsData restore> [The repo id for rsnodgrass/hass-sensorpush is already set to 1016273292] Restore Failed!
<HacsData restore> [The repo id for rsnodgrass/water-heater-card is already set to 1016278627] 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(
ValueError: The repo id for rsnodgrass/hass-sensorpush is already set to 1016273292

I’ve had every release of HACS installed. I have never seen this.

AFAIK, All HACS does is help you load custom Integrations, Themes, Custom Templates, other things and let’s you know if there is an update. Once installed the Custom stuff interacts with HA and doesn’t care about HACS.
If you have more questions, go to the source…
HACS Discord

It’s true for integrations, but for frontend stuff, HACS auto adds an internal path in resources thats an symlink (on hacsfiles path) to the actual www folder. For some reason if HACS doesnt startup, symlink doesnt work and frontend modules wont load up.

Temp solution: chance all resources paths from /hacsfiles/ to /local/community/XXXXXX.
This will load frontend modules even if HACS fails to load.
Be aware that HACS will configure this path via hacsfiles after the module is updated

I have more than 10 HA instances, I had this issue in all of them one point or another (some more than one time). I had to fix 5 instances today. Removing the duplicated from hacs.repository will solve the issue aswell.

Thanks!

1 Like

Well, HACS doesn’t have Add-ons…

Oh yeah my bad… but you get the point

Hi guys, my hacs just failed to load, I have no idea what to do, I see the following error, The repo id for rt400/school-vacation is already set to 153006394 ', most likely from an integration, but I am completely lost on what to do.

1 Like

I had the same, occurred after update of browser_mod this morning.

Restart of HA solved this issue, message no longer shows up.

1 Like

Restarted various times, to no avail

Same thing happened a few months ago with music assistant. You basically have a duplicate entry in the hacs.repositories.

An issue has already been raised for this and closed with a fix, so start by checking if you have any updates pending for HACS.

If not:
Follow this workaround but search for rt400/school-vacation. Make sure you only delete the highlighted rows in the picture and have a backup of that file before changes just in case.