alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.35k stars 263 forks source link

'alexa_media' calls async_fire from a thread at custom_components/alexa_media/sensor.py #2264

Open Marcoletto opened 1 month ago

Marcoletto commented 1 month ago

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

Registratore: homeassistant.helpers.frame Fonte: helpers/frame.py:190 Prima occorrenza: 13:35:17 (1 occorrenze) Ultima registrazione: 13:35:17

Detected that custom integration 'alexa_media' calls async_fire from a thread at custom_components/alexa_media/sensor.py, line 433: self.hass.bus.async_fire(, please report it to the author of the 'alexa_media' custom integration

System details

Alexa Media Player 4.10.0 (last update yesterday)

Marcoletto commented 1 month ago

Registratore: homeassistant Fonte: helpers/frame.py:203 Prima occorrenza: 20:03:00 (2 occorrenze) Ultima registrazione: 20:50:00

Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alexa_media/sensor.py", line 433, in _trigger_event self.hass.bus.async_fire( File "/usr/src/homeassistant/homeassistant/core.py", line 1508, in async_fire self._hass.verify_event_loop_thread("async_fire") File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread frame.report( File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report _report_integration(what, integration_frame, level, error_if_integration) File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration raise RuntimeError( RuntimeError: Detected that custom integration 'alexa_media' calls async_fire from a thread at custom_components/alexa_media/sensor.py, line 433: self.hass.bus.async_fire(. Please report it to the author of the 'alexa_media' custom integration.

AlexW75 commented 1 month ago

Same here - if you need some info I can provide.

Logger: homeassistant.helpers.frame Quelle: helpers/frame.py:190 Erstmals aufgetreten: 07:00:00 (4 Vorkommnisse) Zuletzt protokolliert: 07:45:00

Detected that custom integration 'alexa_media' calls async_fire from a thread at custom_components/alexa_media/sensor.py, line 433: self.hass.bus.async_fire(, please report it to the author of the 'alexa_media' custom integration

daknightuk commented 3 weeks ago

Same here on version Alexa Media Player 4.10.1 RuntimeError: Detected that custom integration 'alexa_media' calls hass.bus.async_fire from a thread other than the event loop, which may cause Home Assistant to crash or data to corrupt. For more information, see https://developers.home-assistant.io/docs/asyncio_thread_safety/#hassbusasync_fire at custom_components/alexa_media/sensor.py, line 433: self.hass.bus.async_fire(. Please report it to the author of the 'alexa_media' custom integration.

Home Assistant

Core 2024.6.1
Supervisor 2024.06.0
Operating System 12.3
Frontend 20240605.0
flyman1664 commented 3 weeks ago

Hi, same here on version Alexa Media Player 4.10.2

Enregistreur: homeassistant.helpers.frame Source: helpers/frame.py:190 S'est produit pour la première fois: 09:20:00 (1 occurrences) Dernier enregistrement: 09:20:00

Detected that custom integration 'alexa_media' calls async_fire from a thread at custom_components/alexa_media/sensor.py, line 433: self.hass.bus.async_fire(, please report it to the author of the 'alexa_media' custom integration

github-actions[bot] commented 13 hours ago

This bug report has been labelled as help wanted since there has been no activity in the last 3 weeks. It will not be closed automatically.