Skip to content
New issue

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

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

Already on GitHub? # to your account

Unable to install version from main branch when "zipRelease": true #3513

Closed
7 tasks done
L2jLiga opened this issue Feb 16, 2024 · 7 comments
Closed
7 tasks done

Unable to install version from main branch when "zipRelease": true #3513

L2jLiga opened this issue Feb 16, 2024 · 7 comments
Labels
issue:backend For issues with the backend/integration

Comments

@L2jLiga
Copy link

L2jLiga commented Feb 16, 2024

System Health details

System Information

version core-2024.2.1
installation_type Unknown
dev false
hassio false
docker false
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 5.15.0-1053-realtime
arch x86_64
timezone Europe/Kaliningrad
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4600
Installed Version 1.34.0
Stage running
Available Repositories 1460
Downloaded Repositories 16
AccuWeather
can_reach_server ok
remaining_requests 23
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 3
resources 8
views 13
mode storage
Recorder
oldest_recorder_run September 27, 2023 at 09:03
current_recorder_run February 16, 2024 at 13:46
estimated_db_size 13243.73 MiB
database_engine postgresql
database_version 16.0

Checklist

Describe the issue

When trying to install version from master branch HACS stucks at downloading

image

Reproduction steps

  1. Open HA
  2. Navigate to HACS
  3. Click "Explore and download repositories"
  4. Search for any with "zip_release": true, for example "Mikrotik Router" integration and click on it
  5. Click "Download"
  6. In "Select version" dropdown choose main branch ("master" or "main" or "dev")
  7. Click "Download"

Debug logs

2024-02-16 13:50:00.175 ERROR (MainThread) [custom_components.hacs] Download failed - Got status code 404 when trying to download https://github.com/tomaae/homeassistant-mikrotik_router/releases/download/master/mikrotik_router.zip
Traceback (most recent call last):
  File "/config/custom_components/hacs/base.py", line 730, in async_download_file
    raise HacsException(
custom_components.hacs.exceptions.HacsException: Got status code 404 when trying to download https://github.com/tomaae/homeassistant-mikrotik_router/releases/download/master/mikrotik_router.zip
2024-02-16 13:50:00.180 ERROR (MainThread) [custom_components.hacs] <Integration tomaae/homeassistant-mikrotik_router> Failed to download https://github.com/tomaae/homeassistant-mikrotik_router/releases/download/master/mikrotik_router.zip
2024-02-16 13:50:06.753 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140508956649280] Error handling message: Unknown error (unknown_error) Андрей from fd02:21:22:0:dea6:32ff:fea9:f5eb (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 234, in hacs_repository_download
    await repository.async_install()
  File "/config/custom_components/hacs/repositories/base.py", line 893, in async_install
    await self.async_install_repository(version=version)
  File "/config/custom_components/hacs/repositories/base.py", line 990, 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

Diagnostics dump

No response

@L2jLiga L2jLiga added the issue:backend For issues with the backend/integration label Feb 16, 2024
@hacs-bot
Copy link

hacs-bot bot commented Feb 16, 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! 👍

@ludeeus
Copy link
Member

ludeeus commented Feb 16, 2024

This is correct. It should not be possible.
When a repository uses release assets (zip_release), only those assets are valid.

@L2jLiga
Copy link
Author

L2jLiga commented Feb 16, 2024

Then what I can do to download version from master branch?
Currently I'm downloading it manually with wget and unzip.

Also I'm pretty sure that I was able to download master branch with "zipRelease" in previous HACS versions

@ludeeus
Copy link
Member

ludeeus commented Feb 16, 2024

Ask the author if you need a development version.
If that was possible before, that was a bug.

@L2jLiga
Copy link
Author

L2jLiga commented Feb 16, 2024

Thanks, I've created issue in mikrotik router about inability to install from master.

Btw, from HACS size I guess it would be better to set "hide_default_branch" to true when "zip_release" is set to true, isn't it?

@ludeeus
Copy link
Member

ludeeus commented Feb 16, 2024

Yes

@ludeeus ludeeus closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
@tomaae
Copy link

tomaae commented Feb 16, 2024

yes, it was possible to install master even with zip releases. obviously master cannot have zip.
if this is intended behavior now, it would be better to hide master option by default when zip_release is selected.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
issue:backend For issues with the backend/integration
Projects
None yet
Development

No branches or pull requests

3 participants