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

Startup tasks from HACS blocking HA startup #3687

Closed
7 tasks done
Paddy0174 opened this issue May 15, 2024 · 6 comments
Closed
7 tasks done

Startup tasks from HACS blocking HA startup #3687

Paddy0174 opened this issue May 15, 2024 · 6 comments

Comments

@Paddy0174
Copy link

System Health details

System Information

version core-2024.5.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.29-haos
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1409
Downloaded Repositories 38
HACS Data ok
AccuWeather
can_reach_server ok
remaining_requests 23
Home Assistant Cloud
logged_in true
subscription_expiration 4. Juni 2024 um 02:00
relayer_connected true
relayer_region eu-central-1
remote_enabled false
remote_connected false
alexa_enabled false
google_enabled false
remote_server eu-central-1-9.ui.nabu.casa
certificate_status ready
instance_id 40xxxxxxxxxxxxxxxxf71
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.3
update_channel stable
supervisor_version supervisor-2024.05.1
agent_version 1.6.0
docker_version 25.0.5
disk_total 30.8 GB
disk_used 19.0 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Samba share (12.3.1), Mosquitto broker (6.4.0), ESPHome (2024.4.2), MariaDB (2.7.1), Grocy (0.21.0), Zigbee2MQTT (1.37.1-1), Home Assistant Google Drive Backup (0.112.1), Terminal & SSH (9.14.0), Piper (1.5.0), Whisper (2.0.0), File editor (5.8.0), openWakeWord (1.10.0)
Dashboards
dashboards 7
resources 20
views 34
mode yaml
Recorder
oldest_recorder_run 13. Mai 2024 um 02:58
current_recorder_run 15. Mai 2024 um 02:26
estimated_db_size 602.25 MiB
database_engine mysql
database_version 10.11.6

Checklist

Describe the issue

After a restart of HA, something's blocking the start up with the error shown in the logs, specifically The system is waiting for tasks: {<Task pending name='Task-2116' coro=<HacsBase.startup_tasks() running at /config/custom_components/hacs/base.py:687> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()]> cb=[set.remove()]>}. The line number changes from user to user, but is in the same +/- 10 lines.

A little investigation shows, that the majority of users with this error have a warning line regarding HACS. There are some people, where the warning reads with specific integrations and it could be fixed by the authors of these integrations.

@bdraco already fixed one of these errors, for other integrations there are issues opened, see here:

Fixed error: home-assistant/core#117331
Open issue 1: home-assistant/core#117256
Open issue 2: home-assistant/core#117194

Reproduction steps

  1. Restart HA

Debug logs

2024-05-15 02:26:50.364 INFO (MainThread) [custom_components.hacs] 
-------------------------------------------------------------------
HACS (Home Assistant Community Store)

Version: 1.34.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
-------------------------------------------------------------------

2024-05-15 02:26:50.403 DEBUG (MainThread) [custom_components.hacs] Configuration type: config_entry
2024-05-15 02:26:50.415 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore started
2024-05-15 02:26:50.527 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore done
2024-05-15 02:26:50.527 INFO (MainThread) [custom_components.hacs] Enable category: integration
2024-05-15 02:26:50.528 INFO (MainThread) [custom_components.hacs] Enable category: plugin
2024-05-15 02:26:50.528 INFO (MainThread) [custom_components.hacs] Enable category: template
2024-05-15 02:26:50.528 INFO (MainThread) [custom_components.hacs] Enable category: python_script
2024-05-15 02:26:50.528 INFO (MainThread) [custom_components.hacs] Enable category: theme
2024-05-15 02:26:50.528 INFO (MainThread) [custom_components.hacs] <HacsFrontend> Using experimental frontend
[...]
2024-05-15 02:26:50.533 INFO (MainThread) [custom_components.hacs] Setting up plugin endpoint
2024-05-15 02:26:50.533 INFO (MainThread) [custom_components.hacs] <HacsFrontend> yaml mode, cache for /hacsfiles/: False
[...]
2024-05-15 02:26:52.212 INFO (MainThread) [custom_components.hacs] Stage changed: setup
2024-05-15 02:26:52.213 INFO (MainThread) [custom_components.hacs] Stage changed: waiting
2024-05-15 02:26:52.213 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts
[...]
2024-05-15 02:27:05.047 DEBUG (MainThread) [custom_components.hacs] There are 6 scheduled recurring tasks
2024-05-15 02:27:05.047 INFO (MainThread) [custom_components.hacs] Loading removed repositories
2024-05-15 02:27:05.397 INFO (MainThread) [custom_components.hacs] Loading known repositories
2024-05-15 02:27:05.397 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for python_script
2024-05-15 02:27:05.399 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for theme
2024-05-15 02:27:05.399 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for integration
2024-05-15 02:27:05.400 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for plugin
2024-05-15 02:27:05.400 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for template
2024-05-15 02:27:20.043 WARNING (MainThread) [homeassistant.core] Something is blocking Home Assistant from wrapping up the start up phase. We're going to continue anyway. Please report the following info at https://github.com/home-assistant/core/issues: person, androidtv.media_player, websocket_api, scene, python_script, mqtt.sensor, mobile_app.binary_sensor, shell_command, moon.sensor, xiaomi_miio.switch, template.binary_sensor, spook, xiaomi_ble.binary_sensor, image_upload, mqtt.binary_sensor, spook.number, tractive.switch, esphome.select, esphome.switch, http, system_log, mobile_app, openai_conversation, wyoming, persistent_notification, rademacher.sensor, recorder, androidtv, spook.select, input_number, switch_as_x, system_health, wyoming.wake_word, androidtv_remote.media_player, mqtt.camera, intent, openai_conversation.conversation, panel_custom, tractive, group.notify, mqtt.device_tracker, telegram_bot, pi_hole, browser_mod.media_player, dwd_weather_warnings.sensor, sun2.sensor, event, spook.event, group.light, tractive.binary_sensor, braviatv.media_player, button, group, shopping_list, mqtt.number, xiaomi_miio.binary_sensor, spook.binary_sensor, fritz.binary_sensor, hacs, braviatv, climate, rademacher.binary_sensor, browser_mod.light, input_boolean, input_datetime, webhook, mqtt.vacuum, time_date.sensor, fritz.image, braviatv.button, weather, mqtt.select, input_button, xiaomi_miio.number, alert, accuweather.weather, esphome.binary_sensor, cloud.stt, wyoming.stt, calendar, accuweather, backup, remote, dwd_pollenflug.sensor, logbook, fritz.update, usb, logger, fritz.sensor, mqtt.light, waste_collection_schedule, browser_mod, spook.switch, blueprint, rademacher.cover, fritz.button, xiaomi_miio.fan, accuweather.sensor, rest.sensor, script, localtuya.sensor, shopping_list.todo, switch, lovelace, local_todo.todo, rademacher.button, moon, localtuya, dwd_weather_warnings, xiaomi_miio.select, esphome.update, fritzbox_callmonitor.sensor, analytics, waste_collection_schedule.sensor, timer, cloud.binary_sensor, androidtv_remote, rademacher.number, input_select, hardware, rademacher.switch, tag, ffmpeg, pi_hole.binary_sensor, caldav.calendar, workday.binary_sensor, fritz.device_tracker, androidtv_remote.remote, uptime.sensor, intent_script, fritz.switch, plant, alarm_control_panel, device_tracker, mqtt, zone, mqtt.switch, workday, hacs.update, systemmonitor.binary_sensor, bluetooth, fan, alarmo, stt, telegram.notify, systemmonitor.sensor, browser_mod.camera, schedule, xiaomi_miio.button, counter, browser_mod.sensor, esphome, rademacher.light, pi_hole.update, input_text, sun.sensor, rest.notify, alarmo.alarm_control_panel, media_source, search, xiaomi_ble.event, onboarding, wake_word, braviatv.remote, auth, rademacher.climate, mqtt.button, select, file_upload, media_player, smtp.notify, mobile_app.device_tracker, tts, dwd, min_max.sensor, mobile_app.sensor, todo, nfandroidtv.notify, vacuum, config, rademacher.scene, device_automation, switch_as_x.light, hassio.update, sun2, pi_hole.switch, number, network, dwd_pollenflug, time, mobile_app.notify, update, history, xiaomi_miio.sensor, dwd.weather, xiaomi_miio, spook.button, binary_sensor, cloud.tts, trace, local_todo, xiaomi_ble.sensor, tractive.device_tracker, notify, rest, hassio.sensor, frontend, sensor, uptime, xiaomi_ble, rademacher, cloud, diagnostics, wyoming.tts, esphome.fan, tractive.sensor, assist_pipeline, sun2.binary_sensor, pi_hole.sensor, spook.time, esphome.sensor, light, rademacher.update, application_credentials, camera, esphome.light, waste_collection_schedule.calendar, image, systemmonitor, template, hacs.sensor, websocket_api.sensor, hassio.binary_sensor, automation, homeassistant.scene, fritzbox_callmonitor, conversation, cover, spook.sensor, bluetooth_adapters, template.sensor, api, fritz, browser_mod.binary_sensor, homeassistant, nfandroidtv, sun, repairs, hassio, mqtt.update The system is waiting for tasks: {<Task pending name='Task-2116' coro=<HacsBase.startup_tasks() running at /config/custom_components/hacs/base.py:687> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()]> cb=[set.remove()]>}
2024-05-15 02:28:06.088 ERROR (MainThread) [custom_components.hacs] Could not update plugin - Timeout of 60s reached
2024-05-15 02:28:06.089 ERROR (MainThread) [custom_components.hacs] Could not update integration - Timeout of 60s reached
2024-05-15 02:28:06.089 INFO (MainThread) [custom_components.hacs] Stage changed: running
2024-05-15 02:28:06.458 DEBUG (MainThread) [custom_components.hacs] <QueueManager> The queue is empty
2024-05-15 02:28:06.459 DEBUG (MainThread) [custom_components.hacs] <HACSStore async_save_to_store> Did not store data for 'hacs.critical'. Content did not change
2024-05-15 02:28:06.459 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2024-05-15 02:37:05.048 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2024-05-15 02:47:05.049 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
[...]
From here on, only "Nothing in the queue" is logged

Diagnostics dump

No response

@Paddy0174 Paddy0174 added the issue:backend For issues with the backend/integration label May 15, 2024
@hacs-bot
Copy link

hacs-bot bot commented May 15, 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 May 15, 2024

Looks like you are having some network issues.
Try disabling IPv6 and reboot the host.

@Paddy0174
Copy link
Author

That's unfortunate, because i can't disable (supervisor won't let me) IPv6. Seems like I'll have to live with it.

Thanks for taking a look! :)

@oywino
Copy link

oywino commented May 15, 2024

Thi is not an IPv6 related issue. I run HA Core in a container on a NAS and IPv6 is completely disabled. Still I have the same issue.

@ludeeus
Copy link
Member

ludeeus commented May 27, 2024

If it's not IPv6, then it is something other network-related.
Or you have something blocking too much, >60s for a single file download is not normal.
Also, from the lineshifts here, it more look like HACS is a side effect not the cause (like with google assistant, but as that is core and this is not it was only considered there).
When you fix/remove what is blocking/limiting/hindering your network requests, this will most likely be resolved everywhere.

On the off chance it continues once that is fixed, recreate this issue with updated (unfiltered) logs from the entire startup, and the system health details.

@ludeeus ludeeus closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
@ludeeus ludeeus removed the issue:backend For issues with the backend/integration label May 27, 2024
@oywino
Copy link

oywino commented May 27, 2024

Maybe this can be of any help;
I noticed that a following error has resulted in almost all integrations update entities are now unavailable:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants