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

Integration update fails silently with "Failed to download zipball" #4146

Open
8 tasks done
Nezz opened this issue Oct 17, 2024 · 1 comment
Open
8 tasks done

Integration update fails silently with "Failed to download zipball" #4146

Nezz opened this issue Oct 17, 2024 · 1 comment
Labels
issue:backend For issues with the backend/integration

Comments

@Nezz
Copy link

Nezz commented Oct 17, 2024

System Health details

System Information

version core-2024.10.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.54-haos
arch x86_64
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 4789
Installed Version 2.0.1
Stage running
Available Repositories 1450
Downloaded Repositories 15
AccuWeather
can_reach_server ok
remaining_requests 25
Home Assistant Cloud
logged_in true
subscription_expiration November 5, 2024 at 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled true
remote_connected true
alexa_enabled false
google_enabled true
remote_server eu-central-1-6.ui.nabu.casa
certificate_status ready
instance_id 1c3b420602134da4af646762c2aef794
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 13.2
update_channel stable
supervisor_version supervisor-2024.10.2
agent_version 1.6.0
docker_version 27.2.0
disk_total 30.8 GB
disk_used 10.4 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization vmware
board ova
supervisor_api ok
version_api ok
installed_addons Mosquitto broker (6.4.1), Terminal & SSH (9.15.0), Zigbee2MQTT (1.40.2-1), Studio Code Server (5.17.2), AirCast (4.2.2), Home Assistant Google Drive Backup (0.112.1)
Dashboards
dashboards 2
resources 7
views 5
mode storage
Recorder
oldest_recorder_run September 17, 2024 at 07:57
current_recorder_run October 18, 2024 at 01:04
estimated_db_size 694.99 MiB
database_engine sqlite
database_version 3.45.3

Checklist

Describe the issue

When developing an integration, I often push to GitHub and then download it via HACS. Sometimes the zipball that HACS downloads returns a 404 because it probably takes some time to be available. When this happens, HACS does not display an error. It also prompts me to restart Home Assistant to update the integration, even though it failed to update.

Reproduction steps

  1. Install a custom integration using your own fork's default branch
  2. Push a commit for a custom integration to the branch
  3. Quickly update it via HACS

Repeat until the error below is logged as it requires a certain timing.

Debug logs

2024-10-18 00:51:35.045 ERROR (MainThread) [custom_components.hacs] Download failed - Got status code 404 when trying to download https://github.com/Nezz/eight_sleep/archive/refs/heads/2ab1381.zip
Traceback (most recent call last):
  File "/config/custom_components/hacs/base.py", line 709, in async_download_file
    raise HacsException(
custom_components.hacs.exceptions.HacsException: Got status code 404 when trying to download https://github.com/Nezz/eight_sleep/archive/refs/heads/2ab1381.zip
2024-10-18 00:51:35.049 ERROR (MainThread) [custom_components.hacs] [<Integration Nezz/eight_sleep>] Failed to download zipball
Traceback (most recent call last):
  File "/config/custom_components/hacs/repositories/base.py", line 631, in download_content
    await self.download_repository_zip()
  File "/config/custom_components/hacs/repositories/base.py", line 677, in download_repository_zip
    raise HacsException(f"[{self}] Failed to download zipball")
custom_components.hacs.exceptions.HacsException: [<Integration Nezz/eight_sleep>] Failed to download zipball

Note that HACS displays and tries to download the correct hash, but in this case it took ~10 minutes for GitHub to catch up and start serving the zipball.

Diagnostics dump

No response

@Nezz Nezz added the issue:backend For issues with the backend/integration label Oct 17, 2024
@hacs-bot
Copy link

hacs-bot bot commented Oct 17, 2024

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! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:backend For issues with the backend/integration
Projects
None yet
Development

No branches or pull requests

1 participant