hacs / integration

HACS gives you a powerful UI to handle downloads of all your custom needs.
https://hacs.xyz
MIT License
5.18k stars 1.25k forks source link

After upgrade to ver. 1.15.0 today HACS never finishes startup #2193

Closed IgorAga closed 3 years ago

IgorAga commented 3 years ago

System Health details

System Health

version core-2021.8.8
installation_type Home Assistant Core
dev false
hassio false
docker false
user homeassistant
virtualenv true
python_version 3.8.5
os_name Linux
os_version 5.10.52-v7l+
arch armv7l
timezone Europe/Moscow
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4984 Installed Version | 1.15.0 Stage | startup Available Repositories | 941 Installed Repositories | 19
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Lovelace dashboards | 3 -- | -- resources | 5 views | 12 mode | storage

Checklist

Describe the issue

HACS never finishes startup after restart of Home Assistant with following message in HACS section:

image

Several issues regarding HACS are logged ('Attempt to decode JSON with unexpected mimetype: ', see Debug logs).

Reproduction steps

  1. sudo systemctl restart homeassistant@homeassistant.service
  2. tail -f /home/homeassistant/.homeassistant/home-assistant.log

Debug logs

2021-08-29 23:21:49 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration yandex_smart_home 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-08-29 23:21:49 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration sonoff 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-08-29 23:21:49 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration morph_numbers 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-08-29 23:21:49 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration yandex_station 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-08-29 23:21:49 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration garbage_collection 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-08-29 23:21:49 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration 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-08-29 23:21:49 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration plex_assistant 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-08-29 23:21:49 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration lkcomu_interrao 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-08-29 23:21:49 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration philips_airpurifier_coap 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-08-29 23:21:49 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration yandex_maps 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-08-29 23:21:49 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration gismeteo 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-08-29 23:21:49 WARNING (SyncWorker_5) [homeassistant.loader] We found a custom integration yi_hack 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-08-29 23:21:49 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration eventsensor 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-08-29 23:22:09 INFO (MainThread) [custom_components.hacs] HACS is enabled
2021-08-29 23:22:09 INFO (MainThread) [custom_components.hacs] 
-------------------------------------------------------------------
HACS (Home Assistant Community Store)

Version: 1.15.0
This is a custom integration
If you have any issues with this you need to open an issue here:
https://github.com/hacs/integration/issues
-------------------------------------------------------------------

2021-08-29 23:22:28 ERROR (MainThread) [homeassistant.components.updater] Error requesting Home Assistant update data: [Errno 32] Broken pipe
2021-08-29 23:22:28 DEBUG (MainThread) [custom_components.hacs] Configuration type: config_entry
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Loaded 11 tasks
2021-08-29 23:22:29 DEBUG (MainThread) [custom_components.hacs] Scheduling the hello_world task to run every 364 days, 0:00:00
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.SETUP
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: setup_websocket_api
2021-08-29 23:22:29 DEBUG (MainThread) [custom_components.hacs] Task setup_websocket_api took 0.00 seconds to complete
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: verify_api
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: check_constrains
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: clear_old_storage
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: activate_categories
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: restore_data
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: setup_sensor
2021-08-29 23:22:29 INFO (SyncWorker_2) [custom_components.hacs] Enable category: integration
2021-08-29 23:22:29 INFO (SyncWorker_2) [custom_components.hacs] Enable category: plugin
2021-08-29 23:22:29 INFO (SyncWorker_2) [custom_components.hacs] Enable category: theme
2021-08-29 23:22:29 INFO (SyncWorker_2) [custom_components.hacs] Enable category: appdaemon
2021-08-29 23:22:29 DEBUG (MainThread) [custom_components.hacs] Task setup_sensor took 0.00 seconds to complete
2021-08-29 23:22:29 INFO (MainThread) [custom_components.hacs] Executing task: setup_frontend
2021-08-29 23:22:29 INFO (SyncWorker_5) [custom_components.hacs] LovelaceMode.STORAGE mode, cache for /hacsfiles/: True
2021-08-29 23:22:32 DEBUG (MainThread) [custom_components.hacs] Task clear_old_storage took 2.33 seconds to complete
2021-08-29 23:22:32 DEBUG (MainThread) [custom_components.hacs] Task check_constrains took 2.33 seconds to complete
2021-08-29 23:22:32 DEBUG (MainThread) [custom_components.hacs] Task activate_categories took 2.33 seconds to complete
2021-08-29 23:22:32 DEBUG (MainThread) [custom_components.hacs] Task setup_frontend took 2.30 seconds to complete
2021-08-29 23:22:32 INFO (MainThread) [custom_components.hacs] Restore started
2021-08-29 23:22:34 DEBUG (MainThread) [custom_components.hacs] Can update 266 repositories
2021-08-29 23:22:34 DEBUG (MainThread) [custom_components.hacs] Task verify_api took 4.98 seconds to complete
2021-08-29 23:22:35 INFO (MainThread) [custom_components.hacs] Restore done
2021-08-29 23:22:35 DEBUG (MainThread) [custom_components.hacs] Task restore_data took 5.41 seconds to complete
2021-08-29 23:22:36 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.STARTUP
2021-08-29 23:22:36 INFO (MainThread) [custom_components.hacs] Executing task: load_hacs_repository
2021-08-29 23:22:36 DEBUG (MainThread) [custom_components.hacs] Task load_hacs_repository took 0.00 seconds to complete
2021-08-29 23:22:37 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.WAITING
2021-08-29 23:22:37 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts
2021-08-29 23:22:37 INFO (MainThread) [custom_components.hacs] HACS is enabled
2021-08-29 23:22:53 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.STARTUP
2021-08-29 23:22:53 INFO (MainThread) [custom_components.hacs] Executing task: load_hacs_repository
2021-08-29 23:22:53 DEBUG (MainThread) [custom_components.hacs] Task load_hacs_repository took 0.00 seconds to complete
2021-08-29 23:22:55 INFO (MainThread) [custom_components.hacs] Loading known repositories
2021-08-29 23:22:58 ERROR (MainThread) [custom_components.hacs] 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.github.com/repos/hacs/default/contents/removed')
2021-08-29 23:22:58 DEBUG (MainThread) [custom_components.hacs] Can update 266 repositories, items in queue 4
2021-08-29 23:22:58 DEBUG (MainThread) [queueman.manager] Checking out tasks to execute
2021-08-29 23:22:58 DEBUG (MainThread) [queueman.manager] Starting queue execution for 4 tasks
2021-08-29 23:22:59 ERROR (MainThread) [custom_components.hacs] 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.github.com/repos/hacs/default/contents/theme')
2021-08-29 23:22:59 ERROR (MainThread) [custom_components.hacs] 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.github.com/repos/hacs/default/contents/plugin')
2021-08-29 23:22:59 ERROR (MainThread) [custom_components.hacs] 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.github.com/repos/hacs/default/contents/integration')
2021-08-29 23:22:59 ERROR (MainThread) [custom_components.hacs] 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.github.com/repos/hacs/default/contents/appdaemon')
2021-08-29 23:22:59 DEBUG (MainThread) [queueman.manager] Queue execution finished for 4 tasks finished in 0.44 seconds
2021-08-29 23:22:59 DEBUG (MainThread) [custom_components.hacs] Starting recurring background task for installed repositories
2021-08-29 23:22:59 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/hacs/hacsbase/hacs.py", line 139, in startup_tasks
    await self.recurring_tasks_installed()
  File "/home/homeassistant/.homeassistant/custom_components/hacs/hacsbase/hacs.py", line 263, in recurring_tasks_installed
    await self.handle_critical_repositories()
  File "/home/homeassistant/.homeassistant/custom_components/hacs/hacsbase/hacs.py", line 172, in handle_critical_repositories
    critical = await self.async_github_get_hacs_default_file("critical")
  File "/home/homeassistant/.homeassistant/custom_components/hacs/base.py", line 232, in async_github_get_hacs_default_file
    response = await self.githubapi.repos.contents.get(
  File "/srv/homeassistant/lib/python3.8/site-packages/aiogithubapi/namespaces/contents.py", line 50, in get
    response = await self._client.async_call_api(
  File "/srv/homeassistant/lib/python3.8/site-packages/aiogithubapi/client.py", line 124, in async_call_api
    response.data = await result.json()
  File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1097, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('https://api.github.com/repos/hacs/default/contents/critical')
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] Can update 266 repositories, items in queue 17
2021-08-29 23:32:59 DEBUG (MainThread) [queueman.manager] Checking out tasks to execute
2021-08-29 23:32:59 DEBUG (MainThread) [queueman.manager] Starting queue execution for 17 tasks
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Plugin thomasloven/lovelace-card-mod> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Plugin custom-cards/unused-card> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration dmitry-k/yandex_smart_home> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Plugin kalkih/mini-graph-card> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration Limych/ha-gismeteo> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Plugin tomasrudh/analogclock> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration betaboon/philips-airpurifier-coap> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration bruxy70/Garbage-Collection> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Theme basnijholt/lovelace-ios-light-mode-theme> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Appdaemon Petro31/ad_seasonal_lights> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration AlexxIT/YandexStation> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration azogue/eventsensor> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration AlexxIT/SonoffLAN> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration custom-components/sensor.yandex_maps> Getting repository information
2021-08-29 23:32:59 DEBUG (MainThread) [custom_components.hacs] <Integration maykar/plex_assistant> Getting repository information
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Plugin thomasloven/lovelace-card-mod> Running checks against 3.0.12
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Theme basnijholt/lovelace-ios-light-mode-theme> Running checks against master
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Appdaemon Petro31/ad_seasonal_lights> Running checks against 1.0
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Plugin tomasrudh/analogclock> Running checks against 1.10
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Plugin custom-cards/unused-card> Running checks against 1.1
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration dmitry-k/yandex_smart_home> Running checks against v0.1.5
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration betaboon/philips-airpurifier-coap> Running checks against v0.7.0
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration custom-components/sensor.yandex_maps> Running checks against master
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration azogue/eventsensor> Running checks against v2.4.2
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration Limych/ha-gismeteo> Running checks against 2.3.3
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Plugin kalkih/mini-graph-card> Running checks against v0.10.0
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration bruxy70/Garbage-Collection> Running checks against 3.20
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration AlexxIT/YandexStation> Running checks against v3.3.0
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration maykar/plex_assistant> Running checks against 1.1.7
2021-08-29 23:33:00 DEBUG (MainThread) [custom_components.hacs] <Integration AlexxIT/SonoffLAN> Running checks against v2.4.6
2021-08-29 23:33:01 DEBUG (MainThread) [custom_components.hacs] 'trigger' is undefined
2021-08-29 23:33:01 DEBUG (MainThread) [custom_components.hacs] 'states' is undefined
2021-08-29 23:33:05 DEBUG (MainThread) [custom_components.hacs] <Plugin AitorDB/home-assistant-sun-card> Getting repository information
2021-08-29 23:33:06 DEBUG (MainThread) [custom_components.hacs] <Integration alryaz/hass-lkcomu-interrao> Getting repository information
2021-08-29 23:33:06 DEBUG (MainThread) [custom_components.hacs] <Plugin AitorDB/home-assistant-sun-card> Running checks against v0.1.4
2021-08-29 23:33:06 DEBUG (MainThread) [custom_components.hacs] <Integration alryaz/hass-lkcomu-interrao> Running checks against v0.0.20
2021-08-29 23:33:12 DEBUG (MainThread) [queueman.manager] Queue execution finished for 17 tasks finished in 13.01 seconds
2021-08-29 23:42:59 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
hacs-bot[bot] commented 3 years ago

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

ludeeus commented 3 years ago

Inside the venv, is curl https://api.github.com/repos/hacs/default/contents/theme working?

gavinpbennett commented 3 years ago

I am having the same issues as reported in the above logs,

System Health

version core-2021.8.8
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.6
os_name Linux
os_version 5.10.17-v8
arch aarch64
timezone Pacific/Auckland
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4706 Installed Version | 1.15.0 Stage | startup Available Repositories | 878 Installed Repositories | 14
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | September 12, 2021, 12:00 PM relayer_connected | true remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | false can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 6.2 -- | -- update_channel | stable supervisor_version | supervisor-2021.06.8 docker_version | 20.10.6 disk_total | 228.5 GB disk_used | 9.7 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Samba share (9.5.1), Check Home Assistant configuration (3.8.0), File editor (5.3.3), Duck DNS (1.13.0), Terminal & SSH (9.1.3), Visual Studio Code (3.6.2), Mosquitto broker (6.0.1), Home Assistant Google Drive Backup (0.104.3), NGINX Home Assistant SSL proxy (3.0.2), Network UPS Tools (0.8.0)
Lovelace dashboards | 2 -- | -- resources | 1 views | 11 mode | storage
mplogas commented 3 years ago

Same.

System Health

version core-2021.9.0b3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.6
os_name Linux
os_version 5.10.53
arch x86_64
timezone Europe/Berlin
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4883 Installed Version | 1.15.0 Stage | startup Available Repositories | 940 Installed Repositories | 8
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | September 25, 2021, 2:00 AM relayer_connected | true remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | false can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 6.2 -- | -- update_channel | beta supervisor_version | supervisor-2021.08.0 docker_version | 20.10.6 disk_total | 48.5 GB disk_used | 5.2 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | SSH & Web Terminal (9.0.1), Zigbee2mqtt (1.21.0-4), Visual Studio Code (3.6.2), Samba share (9.5.1), AppDaemon 4 (0.7.0), Log Viewer (0.11.1), TasmoAdmin (0.15.0), Glances (0.13.0)
Lovelace dashboards | 2 -- | -- resources | 0 views | 1 mode | storage
ludeeus commented 3 years ago

Fixed in https://github.com/hacs/integration/pull/2194

pinkfloydFR commented 3 years ago

How to update on version 1.15.1 if hacs doen't finish to start ? thx

gavinpbennett commented 3 years ago

I ended up restoring a previous snapshot, and then updating to 1.15.1

DavidFW1960 commented 3 years ago

I have 1.15.1 but still see this?

pinkfloydFR commented 3 years ago

For information, i can confirm 1.15.1 resolve the problem for me

raffaelevall commented 3 years ago

How to update on version 1.15.1 if hacs doen't finish to start ? thx

I have the same question

gavinpbennett commented 3 years ago

I ended up restoring a previous snapshot, and then updating to 1.15.1

raffaelevall commented 3 years ago

I ended up restoring a previous snapshot, and then updating to 1.15.1

I don't have a snapshot...I unistall and install Hacs but I have the same version...1.15.0

gavinpbennett commented 3 years ago

Sorry, I can't help further. Do you not have any past backups to restore or recover to?

raffaelevall commented 3 years ago

Sorry, I can't help further. Do you not have any past backups to restore or recover to?

Many tks, I have a VM snapshot but are more than 30GB ....if is possible I prefer to do something else ;-)

lukas-berger commented 3 years ago

Sorry, I can't help further. Do you not have any past backups to restore or recover to?

Many tks, I have a VM snapshot but are more than 30GB ....if is possible I prefer to do something else ;-)

@raffaelevall I also had 1.15.0 installed and had the issue, what worked for me to get it running again (and then update do 1.15.1) was editing the following file in home assistant: /custom_components/hacs/manifest.json and changing line 20 to what you see in the screenshot, from "aiogithubapi>=21.8.0", to "aiogithubapi>=21.8.1", image

After a restart of Home Assistant, HACS started up fine and I could update to the new version as well.

raffaelevall commented 3 years ago

Sorry, I can't help further. Do you not have any past backups to restore or recover to?

Many tks, I have a VM snapshot but are more than 30GB ....if is possible I prefer to do something else ;-)

@raffaelevall I also had 1.15.0 installed and had the issue, what worked for me to get it running again (and then update do 1.15.1) was editing the following file in home assistant: /custom_components/hacs/manifest.json and changing line 20 to what you see in the screenshot, from "aiogithubapi>=21.8.0", to "aiogithubapi>=21.8.1", image

After a restart of Home Assistant, HACS started up fine and I could update to the new version as well.

Many tks my friend, I'm going to try....but don't work for me :-(

pinkfloydFR commented 3 years ago

This solution is clean, but for information, this is the dirty way i used to resolve mine :

raffaelevall commented 3 years ago

This solution is clean, but for information, this is the dirty way i had resolved mine :

  • download hacs.zip (1.15.1) from github ( https://tinyl.io/4h2G )
  • backup "/config/custom_component/hacs" then replace this one by the github one
  • restart server
  • update hacs ( seem the version is wrong, so force update will correct this )

Dirty way....but works for me. A great tks