Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HACS does not update from 2.0.1 to 2.0.2 #4346

Closed
8 tasks done
aapo1974 opened this issue Jan 8, 2025 · 31 comments
Closed
8 tasks done

HACS does not update from 2.0.1 to 2.0.2 #4346

aapo1974 opened this issue Jan 8, 2025 · 31 comments
Labels
Missing required issue information Added to issues with missing information from the issue template

Comments

@aapo1974
Copy link

aapo1974 commented Jan 8, 2025

System Health details

System Information

version core-2025.1.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.13.1
os_name Linux
os_version 6.6.62-haos-raspi
arch aarch64
timezone Europe/Helsinki
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 4980
Installed Version 2.0.1
Stage running
Available Repositories 1496
Downloaded Repositories 22
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 14.1
update_channel stable
supervisor_version supervisor-2024.12.3
agent_version 1.6.0
docker_version 27.2.0
disk_total 457.4 GB
disk_used 16.1 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board yellow
supervisor_api ok
version_api ok
installed_addons Matter Server (7.0.0), Terminal & SSH (9.16.0), Mosquitto broker (6.4.1), Studio Code Server (5.18.0), Let's Encrypt (5.2.10), TubesZB TI CC2652 FW Flasher (0.3.5.2), Zigbee2MQTT (2.0.0-2)
Dashboards
dashboards 2
resources 18
views 10
mode storage
Recorder
oldest_recorder_run 27. joulukuuta 2024 klo 14.38
current_recorder_run 8. tammikuuta 2025 klo 08.17
estimated_db_size 445.95 MiB
database_engine sqlite
database_version 3.47.1

Checklist

  • I'm running the newest version of HACS https://github.com/hacs/integration/releases/latest
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • I have read https://hacs.xyz/docs/help/issues/
  • This issue is related to the backend (integration part) of HACS.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This is a bug and not a feature request.
  • This issue is not a duplicate issue of currently open or issues pending release.

Describe the issue

HACS does not update from 2.0.1 to 2.0.2. It gets stuck on 50 % progress. This HA is on Home Assistant Yellow hardware. I have a similar HA on Proxmox server at a different location and was able to update HACS.

Reproduction steps

  1. Reboot HA
  2. Go to settings and updates
  3. Choose HACS update
  4. Press update button

Debug logs

Lokikirjaaja: homeassistant.components.websocket_api.http.connection
Lähde: components/websocket_api/commands.py:245
integraatio: Home Assistant WebSocket API (dokumentaatio, ongelmat)
Ensimmäistä kertaa ilmennyt: 08.23.32 (1 tapahtumat)
Viimeksi kirjattu: 08.23.32

[547940691120] Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/hacs/repositories/base.py", line 1436, in async_download_repository
    await self.async_install(version=ref)
  File "/config/custom_components/hacs/repositories/base.py", line 884, in async_install
    await self.async_install_repository(version=version)
  File "/config/custom_components/hacs/repositories/base.py", line 986, in async_install_repository
    raise HacsException("Could not download, see log for details")
custom_components.hacs.exceptions.HacsException: Could not download, see log for details

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/hacs/update.py", line 88, in async_install
    await self.repository.async_download_repository(ref=version or self.latest_version)
  File "/config/custom_components/hacs/repositories/base.py", line 1438, in async_download_repository
    raise HacsException(
    ...<2 lines>...
    ) from exception
custom_components.hacs.exceptions.HacsException: Downloading hacs/integration with version 2.0.2 failed with (Could not download, see log for details)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2795, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2838, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1006, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1078, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 157, in async_install
    await entity.async_install_with_progress(version, backup)
  File "/usr/src/homeassistant/homeassistant/components/update/__init__.py", line 489, in async_install_with_progress
    await self.async_install(version, backup)
  File "/config/custom_components/hacs/update.py", line 90, in async_install
    raise HomeAssistantError(exception) from exception
homeassistant.exceptions.HomeAssistantError: Downloading hacs/integration with version 2.0.2 failed with (Could not download, see log for details)

Diagnostics dump

config_entry-hacs-16de9f2e0216d56985518615b81eac5f.json

@aapo1974 aapo1974 added the issue:backend For issues with the backend/integration label Jan 8, 2025
@hacs-bot
Copy link

hacs-bot bot commented Jan 8, 2025

Make sure you have read the issue guidelines and that you filled out the entire template.

If you have an issue identical to this, do not add comments like "same here", "i have this too", instead add a 👍 reaction to the issue description. Thanks! 👍

@ludeeus ludeeus added Missing required issue information Added to issues with missing information from the issue template and removed issue:backend For issues with the backend/integration labels Jan 8, 2025
@gumileeev
Copy link

gumileeev commented Jan 8, 2025

I have a 1 in 1 situation
HACS does not update from 2.0.1 to 2.0.2. It gets stuck on 50 % progress.

"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2025.1.1",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.13.1",
"docker": true,
"arch": "aarch64",
"timezone": "Europe/Moscow",
"os_name": "Linux",
"os_version": "6.6.62-haos-raspi",
"supervisor": "2024.12.3",
"host_os": "Home Assistant OS 14.1",
"docker_version": "27.2.0",
"chassis": "embedded",
"run_as_root": true

config_entry-hacs-01JE3E7MR375126CXRXEP1ND05.json

@rodalpho
Copy link

rodalpho commented Jan 8, 2025

The devs seem to be malicious about this issue, they keep closing tickets about updates failing, including mine earlier this week. I guess we may need to fork HACS? Not sure what happened there.

Honestly unless I get an explanation I'm not sure I want to update. I'm not sure I trust them.

@sgoldtho
Copy link

sgoldtho commented Jan 9, 2025

Looks like it's trying to download from:
https://github.com/hacs/integration/releases/download/tags/2.0.2/hacs.zip

Perhaps it should be:
https://github.com/hacs/integration/releases/download/2.0.2/hacs.zip

@aapo1974
Copy link
Author

aapo1974 commented Jan 9, 2025

Looks like it's trying to download from: https://github.com/hacs/integration/releases/download/tags/2.0.2/hacs.zip

Perhaps it should be: https://github.com/hacs/integration/releases/download/2.0.2/hacs.zip

Is there a way to fix the url on my own HA?

@rjdalga
Copy link

rjdalga commented Jan 9, 2025

I'm getting the following error message.

Logger: custom_components.hacs
Source: custom_components/hacs/base.py:406
integration: HACS (documentation, issues)
First occurred: January 8, 2025 at 3:08:20 PM (68 occurrences)
Last logged: 7:53:24 AM

HACS is disabled - restore

Could use some help trying to fix it.

@rjdalga
Copy link

rjdalga commented Jan 9, 2025

...furthermore, the issue may be related to the following error message:
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: January 8, 2025 at 3:08:20 PM (68 occurrences)
Last logged: 7:53:24 AM

[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

@gumileeev
Copy link

I tried to update now. And everything worked! Something like this )

@rjdalga
Copy link

rjdalga commented Jan 9, 2025

I do not see an update...just a 'Failed to Set up' notice on the integration page. Reloading the integration doesn't help. I also tried restarting HA but to no avail.

@jjanssen95
Copy link

For people (on HAOS I guess?) still searching for the solution to this. Found this hidden in one of the many reddit posts about this issue:

Settings → Devices & Settings → HACS → Configure → and for me after checking the Enable AppDaemon apps discovery & tracking, solved the problem

Instantly HACS showed up again for me with the notion to update.

@aapo1974
Copy link
Author

aapo1974 commented Jan 9, 2025

For people (on HAOS I guess?) still searching for the solution to this. Found this hidden in one of the many reddit posts about this issue:

Settings → Devices & Settings → HACS → Configure → and for me after checking the Enable AppDaemon apps discovery & tracking, solved the problem

Instantly HACS showed up again for me with the notion to update.

Tried this. I was still unable to update.

@rjdalga
Copy link

rjdalga commented Jan 9, 2025

Ditto... still showing 'failed to setup'. Error log shows:
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:324
First occurred: 9:41:44 AM (1 occurrences)
Last logged: 9:41:44 AM

Detected that custom integration 'hacs' sets option flow config_entry explicitly, which is deprecated at custom_components/hacs/config_flow.py, line 199: self.config_entry = config_entry. This will stop working in Home Assistant 2025.12, please create a bug report at https://github.com/hacs/integration/issues

@rjdalga
Copy link

rjdalga commented Jan 9, 2025

Sorry, needed to reload the integration. Update now shows up.

@mellkord
Copy link

mellkord commented Jan 9, 2025

Looks like the problem is specific to the "music-assistant/hass-music-assistant" integration, which was already marked as deprecated but now seems to be completely broken. I wasn't able to fix it via UI but if you have access to the HAOS file system you can amend HACS repositories cache file "config/.storage/hacs.repositories" by removing the entry for the "music-assistant/hass-music-assistant". Save and restart HA and vuala HACS are back and running.

@aapo1974
Copy link
Author

aapo1974 commented Jan 9, 2025

Looks like the problem is specific to the "music-assistant/hass-music-assistant" integration, which was already marked as deprecated but now seems to be completely broken. I wasn't able to fix it via UI but if you have access to the HAOS file system you can amend HACS repositories cache file "config/.storage/hacs.repositories" by removing the entry for the "music-assistant/hass-music-assistant". Save and restart HA and vuala HACS are back and running.

I don't have this entry in my config/.storage/hacs.repositories file. So, no luck fixing this issue.

@rob-odwyer
Copy link

Looks like the problem is specific to the "music-assistant/hass-music-assistant" integration, which was already marked as deprecated but now seems to be completely broken. I wasn't able to fix it via UI but if you have access to the HAOS file system you can amend HACS repositories cache file "config/.storage/hacs.repositories" by removing the entry for the "music-assistant/hass-music-assistant". Save and restart HA and vuala HACS are back and running.

This worked for me. The file is located at /root/config/.storage/hacs.repositories specifically on HAOS, and the entry I removed was the one associated with the key "476357279". I reloaded my HA and HACS loaded successfully, then I upgraded to 2.0.2.

I also realized after I made this manual change that the upgrade option for HACS had been hidden in the main settings screen behind the "Show All Updates" button, because I had a few updates queued up. I'm honestly not sure if HACS had to successfully reload for this update to be there. If you're having this issue, maybe double check whether you can just upgrade HACS first before manually changing any files!

@arcimus
Copy link

arcimus commented Jan 9, 2025

Looks like the problem is specific to the "music-assistant/hass-music-assistant" integration, which was already marked as deprecated but now seems to be completely broken. I wasn't able to fix it via UI but if you have access to the HAOS file system you can amend HACS repositories cache file "config/.storage/hacs.repositories" by removing the entry for the "music-assistant/hass-music-assistant". Save and restart HA and vuala HACS are back and running.

HACS and homeassistant were both showing that updates were available. I updated homeassistant first, then HACS failed to start. I removed the blocks below from hacs.repositories, after which HACS started and I was able to perform the update.

"911125621": { "repository_manifest": {}, "new": true, "full_name": "music-assistant/hass-music-assistant", "category": "integration", "description": "(deprecated) custom integration for Music Assistant", "domain": "mass", "etag_repository": "W/\"60e65512b31dccef12cdc4780c020e4b3e3cf74330748aa34dd456541dcdff96\"", "last_updated": "2025-01-02T09:59:27Z", "last_fetched": 1736000240.945879 },
and
"476357279": { "repository_manifest": { "name": "Music Assistant", "render_readme": true, "zip_release": true, "filename": "mass.zip", "hide_default_branch": true, "homeassistant": "2024.6.0" }, "new": true, "full_name": "music-assistant/hass-music-assistant", "authors": [ "@marcelveldt" ], "category": "integration", "description": "Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.", "domain": "mass", "downloads": 22395, "etag_repository": "W/\"fa18f773adf6893999239e1e22aede8202bd7384e1aa7066def8ec82cda28dbf\"", "last_updated": "2024-12-30T12:30:00Z", "stargazers_count": 1452, "topics": [ "music-library", "music-player" ], "last_fetched": 1735791758.320863 },

@Dirksche
Copy link

Dirksche commented Jan 9, 2025

For people (on HAOS I guess?) still searching for the solution to this. Found this hidden in one of the many reddit posts about this issue:

Settings → Devices & Settings → HACS → Configure → and for me after checking the Enable AppDaemon apps discovery & tracking, solved the problem

Instantly HACS showed up again for me with the notion to update.

This fixed the problem on my system. After checking "Enable AppDaemon apps discovery & tracking", the error was gone and I was offered an update,

Shall I leave "Enable AppDaemon apps discovery & tracking" checked, or shall I uncheck it again? I have no clue what this setting is about.

@Do0816
Copy link

Do0816 commented Jan 10, 2025

Same - it helped but i also do not know if to leave the demon on or put it back off.

@Sitruk
Copy link

Sitruk commented Jan 10, 2025

For people (on HAOS I guess?) still searching for the solution to this. Found this hidden in one of the many reddit posts about this issue:
Settings → Devices & Settings → HACS → Configure → and for me after checking the Enable AppDaemon apps discovery & tracking, solved the problem
Instantly HACS showed up again for me with the notion to update.

This fixed the problem on my system. After checking "Enable AppDaemon apps discovery & tracking", the error was gone and I was offered an update,

Shall I leave "Enable AppDaemon apps discovery & tracking" checked, or shall I uncheck it again? I have no clue what this setting is about.

For me, I had to UNCHECK this option. I could then upgrade HACS to 2.0.2. In order for all my custom element issues to resolve, I had to restart the entire system. After everything was back up again, I checked this box and reloaded the service.

For some reason, I still have custom element issues when accessing externally. Everything looks normal from the LAN.

@DabblerIOT
Copy link

For people (on HAOS I guess?) still searching for the solution to this. Found this hidden in one of the many reddit posts about this issue:

Settings → Devices & Settings → HACS → Configure → and for me after checking the Enable AppDaemon apps discovery & tracking, solved the problem

Instantly HACS showed up again for me with the notion to update.

This is the fix, after checking the box, click 3 dots and reload. Then it loads right, and update shows up in settings of ha. (running haos).

TYVM!!!

@Anj-0110
Copy link

After previous fails to install the update, I tried again yesterday and the update finally went through.

@sochkasov
Copy link

I have a HASSIO installation. I also couldn't upgrade HACKS from 2.0.1 to 2.0.2.
There was an entry in the logs:

Failed to download https://github.com/hacs/integration/releases/download/tags/2.0.2/hacs.zip

This path is wrong. Result is not found (404)

I tried to use the advice from here.

https://community.home-assistant.io/t/unable-to-update-hacs-nor-hacs-integrations/423337/23

I executed the command

wget -O - https://get.hacs.xyz | bash -

And after successfully executing the script and restarting the server, I got a broken system. I only had one container loaded.

# docker ps
CONTAINER ID   IMAGE                                                    COMMAND               CREATED      STATUS         PORT                                     NAMES
a7ee43e918db   ghc.io/home-assistant/amd64-hassio-observer:2023.06.0   "/usr/bin/observer"   2 days ago   Up 3 minutes   0.0.0.0:4357->80/tcp, [::]:4357->80/tcp   hassio_observer

I have upgraded supervisor from version 1.8.0 to version 2.0.0.

wget -O homeassistant-supervised.deb https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
apt install ./homeassistant-supervised.deb

This restored the system's functionality. I also saw that the version of HACKS has been successfully upgraded to 2.0.2.

@innocent-bot
Copy link

Yes this fixed it for me aswell.

@John-H-Smith
Copy link

Running wget -O - https://get.hacs.xyz | bash - over the Advanced SSH & Web Terminal also fixed the issue for me. No problems at all.

@ohshazbot
Copy link

Also had this issue, did the Enable AppDaemons bit, restarted, and was then able to upgrade. Unfortunately in the process it looks like it lost reference for what HACS integrations I had set up so I need to reinstall them

@NeoGen85
Copy link

Also had this issue, did the Enable AppDaemons bit, restarted, and was then able to upgrade. Unfortunately in the process it looks like it lost reference for what HACS integrations I had set up so I need to reinstall them

Same here! =(

Tried the solution with "App deamon" checkbox, got the update, but now HACS don't seem to recognize any of the installed integrations.

@ohshazbot
Copy link

Also had this issue, did the Enable AppDaemons bit, restarted, and was then able to upgrade. Unfortunately in the process it looks like it lost reference for what HACS integrations I had set up so I need to reinstall them

Same here! =(

Tried the solution with "App deamon" checkbox, got the update, but now HACS don't seem to recognize any of the installed integrations.

FWIW, it was pretty easy to find the custom integrations I had as the general HA integrations page still listed them, HACS was just unaware. And I believe they continued to not be present after I upgraded to 2.0.2 and unchecked AppDaemons

@gcoan
Copy link

gcoan commented Jan 14, 2025

I had no problem upgrading HACS to 2.0.2, but whilst doing so I noticed I had the appdaemon libraries option on and I’m not using appdaemon any more so unticked it.

Maybe this was a mistake or HACS 2.0.2 caused it, but HACS forgot about all of my installed HACS components - integrations and dashboard entries.
No reminders about updates being due and if I go into HACS/entities all the list of update entities are showing as unavailable and no longer provided by the integration.

Had to manually re-download every HACS component, find details of the custom repositories for the non-standard stuff, reboot HA afterwards.

What a pain. Not a good upgrade experience at all

@ludeeus
Copy link
Member

ludeeus commented Jan 14, 2025

Closing this as OP never provided the required information and this issue has gone into different paths....
If you are missing stuff in HACS you have 2 choices:

Option 1 (best):
1. Update / re-install HACS to get the current version.
2. Disable HACS.
3. Restart Home Assistant
4. Restore a backup of `<config>/.storage/hacs.repositories`.
5. Start Home Assistant
Option 2:
1. Update / re-install HACS to get the current version.
2. Re-download all items you had before.

@ludeeus ludeeus closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
@aapo1974
Copy link
Author

aapo1974 commented Jan 14, 2025

I removed Hacs and installed 2.0.2. Today I tried to update to 2.0.3 -> No luck, stuck on 50%.

@hacs hacs locked and limited conversation to collaborators Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Missing required issue information Added to issues with missing information from the issue template
Projects
None yet
Development

No branches or pull requests