HACS failed - Unable to install package hacs_frontend

Today HACS stopped functioning, and with it also all the custom cards that were installed using HACS stopped working.

Anyone experienced anything like this? Any thoughts on how to fix it or proceed?
Just the normal uninstall/reinstall and hope for the best?

It first started with a HA notification:

     The following integrations and platforms could not be set up:
      hacs
     Please check your config and logs.

I saw a message to upgrade to a new(er) version of HA because of security concerns related to HACS. So I took the plunge and upgraded HA to version core-2021.1.3.
After the upgrade and HA restart, HACS and also the custom cards installed through HACS are not working. I also rebooted the RPi host, just to cover that option, but to no avail.

Situation now as follows:

  • HACS does not show in the HA Sidebar.
  • None of the custom cards installed by HACS works.
    They display error: Custom element doesn't exist: mini-graph-card.
    The HA Resource Definitions still exist, and they point to valid files in “config/www/community”.
  • The HACS Integration exists and shows in Integrations.
    It has one Entity, hacs, with status “Unavailable”, and description:
    This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.

My setup:
– HACS Firmware version: 1.10.0
– HA version: core-2021.1.3 , Supervisor version supervisor-2021.01.4
– Running HA in a Docker configuration on a RPi 4.

Errors in HA log after server reboot:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
[20:38:19] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2021-01-16 20:38:27 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2021-01-16 20:39:18 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package hacs_frontend==20210103144316: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87148>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /simple/hacs-frontend/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87808>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /simple/hacs-frontend/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87e20>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /simple/hacs-frontend/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c876a0>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /simple/hacs-frontend/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87628>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /simple/hacs-frontend/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c879d0>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /alpine-3.12/armv7/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87a18>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /alpine-3.12/armv7/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c878e0>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /alpine-3.12/armv7/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87940>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /alpine-3.12/armv7/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0xb4c87c10>: Failed to establish a new connection: [Errno -2] Name does not resolve')': /alpine-3.12/armv7/
ERROR: Could not find a version that satisfies the requirement hacs_frontend==20210103144316 (from versions: none)
ERROR: No matching distribution found for hacs_frontend==20210103144316
2021-01-16 20:39:18 ERROR (MainThread) [homeassistant.setup] Setup failed for hacs: Requirements for hacs not found: ['hacs_frontend==20210103144316'].
2021-01-16 20:39:19 ERROR (MainThread) [metno] https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:default [Name does not resolve]
2021-01-16 20:39:23 ERROR (MainThread) [metno] https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:default [Name does not resolve]
2021-01-16 20:39:23 ERROR (MainThread) [metno] https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/complete returned Cannot connect to host aa015h6buqvih86i1.api.met.no:443 ssl:default [Name does not resolve]

Hacs running ok here

A second restart sometimes helps.

The solution was rather simple.

  1. Move the card files from their current location, to the “/config/www” directory.
    e.g.
     sudo mv www/community/mini-graph-card/mini-graph-card-bundle.js  www
  1. Update the Resource definition in Configuration > Lovelace Dashboards > Resources
    Change from “/hacsfiles/mini-graph-card/mini-graph-card-bundle.js
    to “/local/mini-graph-card-bundle.js

  2. Uninstall HACS.

Voilà!

Back to the bliss of a stable HA system.

I have a similar issue after updating to the latest HA. My HACS fail to configure at startup. It will allow me to uninstall and then re-install and configure via GITHUB, but it then needs a reboot which just breaks HACS again…

In case this helps anyone - I managed to resolve this by removing all HACS from my Config.yaml as well as my token. Deleting HACS from the integrations page and reinstalling it