hacs / integration

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

Detected blocking call to open inside the event loop by custom integration 'hacs' #3744

Closed krazos closed 1 month ago

krazos commented 1 month ago

System Health details

System Information

version core-2024.6.0b1
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 America/New_York
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4993 Installed Version | 1.34.0 Stage | running Available Repositories | 1402 Downloaded Repositories | 46 HACS Data | ok
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 12.3 -- | -- update_channel | beta supervisor_version | supervisor-2024.05.2 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 48.5 GB disk_used | 25.6 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Zigbee2MQTT Proxy (0.2.0), Studio Code Server (5.15.0), Advanced SSH & Web Terminal (18.0.0), ESPHome (2024.5.4), Z-Wave JS UI (3.6.0), Frigate Proxy (1.5), Samba share (12.3.1), File editor (5.8.0), Samba Backup (5.2.0), MQTT Explorer (browser-1.0.1), ESPresense Companion (0.6.5)
keymaster zwave_integration | zwave_js -- | -- network_status | off
Dashboards dashboards | 9 -- | -- resources | 24 views | 78 mode | storage
Recorder oldest_recorder_run | May 21, 2024 at 3:02 PM -- | -- current_recorder_run | May 30, 2024 at 11:50 AM estimated_db_size | 2101.32 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

Log warning in core-2024.6.0b0:

Logger: homeassistant.util.loop Source: util/loop.py:81 First occurred: 11:50:42 AM (665 occurrences) Last logged: 11:51:39 AM

Detected blocking call to open inside the event loop by custom integration 'hacs' at custom_components/hacs/repositories/base.py, line 600: zip_file.extractall(self.content.path.local) (offender: /usr/local/lib/python3.12/zipfile/init.py, line 1790: open(targetpath, "wb") as target:), please create a bug report at https://github.com/hacs/integration/issues

Reproduction steps

N/A

Debug logs

2024-05-30 12:05:43.554 WARNING (SyncWorker_0) [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
2024-05-30 12:05:46.856 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'battery_notes' at custom_components/battery_notes/library_updater.py, line 91: with open(json_path, "w", encoding="utf-8") as file: (offender: /config/custom_components/battery_notes/library_updater.py, line 91: with open(json_path, "w", encoding="utf-8") as file:), please create a bug report at https://github.com/andrew-codechimp/ha-battery-notes/issues
2024-05-30 12:05:46.867 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open inside the event loop by custom integration 'battery_notes' at custom_components/battery_notes/library.py, line 64: with open(json_default_path, encoding="utf-8") as default_file: (offender: /config/custom_components/battery_notes/library.py, line 64: with open(json_default_path, encoding="utf-8") as default_file:), please create a bug report at https://github.com/andrew-codechimp/ha-battery-notes/issues
2024-05-30 12:05:47.848 WARNING (ImportExecutor_0) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.
2024-05-30 12:05:47.912 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'ge_home' accesses hass.helpers.aiohttp_client. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from aiohttp_client directly at custom_components/ge_home/update_coordinator.py, line 211: session = self.hass.helpers.aiohttp_client.async_get_clientsession(), please report it to the author of the 'ge_home' custom integration
2024-05-30 12:05:48.200 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'browser_mod' accesses hass.helpers.storage. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from storage directly at custom_components/browser_mod/store.py, line 94: self.store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY), please report it to the author of the 'browser_mod' custom integration
2024-05-30 12:05:48.212 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'browser_mod' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/browser_mod/mod_view.py, line 24: hass.components.frontend.async_register_built_in_panel(, please report it to the author of the 'browser_mod' custom integration
2024-05-30 12:05:48.581 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-30 12:05:48.788 DEBUG (MainThread) [custom_components.hacs] Configuration type: config_entry
2024-05-30 12:05:48.809 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore started
2024-05-30 12:05:48.983 INFO (MainThread) [custom_components.hacs] <HacsData restore> Restore done
2024-05-30 12:05:48.983 INFO (MainThread) [custom_components.hacs] Enable category: integration
2024-05-30 12:05:48.984 INFO (MainThread) [custom_components.hacs] Enable category: plugin
2024-05-30 12:05:48.984 INFO (MainThread) [custom_components.hacs] Enable category: template
2024-05-30 12:05:48.985 INFO (MainThread) [custom_components.hacs] Enable category: theme
2024-05-30 12:05:48.985 INFO (MainThread) [custom_components.hacs] <HacsFrontend> Using experimental frontend
2024-05-30 12:05:48.986 INFO (MainThread) [custom_components.hacs] Setting up plugin endpoint
2024-05-30 12:05:48.986 INFO (MainThread) [custom_components.hacs] <HacsFrontend> storage mode, cache for /hacsfiles/: True
2024-05-30 12:05:53.724 INFO (MainThread) [custom_components.hacs] Stage changed: setup
2024-05-30 12:05:53.725 INFO (MainThread) [custom_components.hacs] Stage changed: waiting
2024-05-30 12:05:53.725 INFO (MainThread) [custom_components.hacs] Setup complete, waiting for Home Assistant before startup tasks starts
2024-05-30 12:06:23.663 INFO (MainThread) [custom_components.hacs] Stage changed: startup
2024-05-30 12:06:23.677 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 642: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-05-30 12:06:23.677 DEBUG (MainThread) [custom_components.hacs] There are 6 scheduled recurring tasks
2024-05-30 12:06:23.677 INFO (MainThread) [custom_components.hacs] Loading removed repositories
2024-05-30 12:06:23.742 INFO (MainThread) [custom_components.hacs] Loading known repositories
2024-05-30 12:06:23.743 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for theme
2024-05-30 12:06:23.746 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for plugin
2024-05-30 12:06:23.747 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for integration
2024-05-30 12:06:23.748 DEBUG (MainThread) [custom_components.hacs] Fetching updated content for template
2024-05-30 12:06:23.858 INFO (MainThread) [custom_components.hacs] Stage changed: running
2024-05-30 12:06:23.888 DEBUG (MainThread) [custom_components.hacs] <QueueManager> The queue is empty
2024-05-30 12:06:23.888 DEBUG (MainThread) [custom_components.hacs] <HACSStore async_save_to_store> Did not store data for 'hacs.critical'. Content did not change
2024-05-30 12:06:23.889 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2024-05-30 12:06:24.102 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'entity_id' when rendering '{{ trigger.entity_id }}'

2024-05-30 12:06:59.966 WARNING (MainThread) [homeassistant.helpers.script] Error in 'choose[0]' evaluation: In 'template' condition: TypeError: argument of type 'NoneType' is not iterable
2024-05-30 12:07:00.017 WARNING (MainThread) [homeassistant.helpers.script] Error in 'choose[0]' evaluation: In 'template' condition: TypeError: argument of type 'NoneType' is not iterable
2024-05-30 12:07:00.020 WARNING (MainThread) [homeassistant.helpers.script] Error in 'choose[0]' evaluation: In 'template' condition: TypeError: argument of type 'NoneType' is not iterable
2024-05-30 12:16:23.679 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2024-05-30 12:26:23.681 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2024-05-30 12:36:23.682 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue
2024-05-30 12:46:23.682 DEBUG (MainThread) [custom_components.hacs] Nothing in the queue

Diagnostics dump

No response

hacs-bot[bot] commented 1 month ago

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 :+1: reaction to the issue description. Thanks! :+1:

schuettecarsten commented 1 month ago

I found a similar warning in my logs:

2024-05-31 08:49:22.329 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues