You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing the Music Assistant Jukebox integration, Home Assistant logs multiple warnings about blocking file operations inside the event loop. These operations should not run directly in HA’s async loop because they can impact performance and responsiveness.
Relevant log excerpts
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/www/jukebox/internal_url_qr.png', 'w+b') inside the event loop by custom integration 'music_assistant_jukebox' at custom_components/music_assistant_jukebox/init.py, line 76: qr_image.save(str(qr_path))
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to shutil.copy2 ...
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to shutil.rmtree ...
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir ...
To Reproduce
Install the Jukebox integration (latest from HACS).
Restart Home Assistant.
Check the logs under Settings → System → Logs.
Expected behavior
File operations (save QR code, copy HTML, copytree media, etc.) should be offloaded using hass.async_add_executor_job() or an async-safe alternative so that they don’t block HA’s event loop.
Environment
Home Assistant Core: 2025.x.x
Python: 3.13
Music Assistant Jukebox: latest HACS version (as of Aug 2025)
Running on: Home Assistant OS / Supervisor
Additional context
The warnings appear every startup and fill the log. While HA does continue running, this may introduce sluggishness and risks stability. It would be great if file I/O could be adjusted to follow HA async best practices.
Has anyone experienced this same issue? ChatGPT has discovered this issue for me and proposed the above bug report
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
After installing the Music Assistant Jukebox integration, Home Assistant logs multiple warnings about blocking file operations inside the event loop. These operations should not run directly in HA’s async loop because they can impact performance and responsiveness.
Relevant log excerpts
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/www/jukebox/internal_url_qr.png', 'w+b') inside the event loop by custom integration 'music_assistant_jukebox' at custom_components/music_assistant_jukebox/init.py, line 76: qr_image.save(str(qr_path))
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to shutil.copy2 ...
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to shutil.rmtree ...
WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir ...
To Reproduce
Install the Jukebox integration (latest from HACS).
Restart Home Assistant.
Check the logs under Settings → System → Logs.
Expected behavior
File operations (save QR code, copy HTML, copytree media, etc.) should be offloaded using hass.async_add_executor_job() or an async-safe alternative so that they don’t block HA’s event loop.
Environment
Home Assistant Core: 2025.x.x
Python: 3.13
Music Assistant Jukebox: latest HACS version (as of Aug 2025)
Running on: Home Assistant OS / Supervisor
Additional context
The warnings appear every startup and fill the log. While HA does continue running, this may introduce sluggishness and risks stability. It would be great if file I/O could be adjusted to follow HA async best practices.
Has anyone experienced this same issue? ChatGPT has discovered this issue for me and proposed the above bug report
Beta Was this translation helpful? Give feedback.
All reactions