bushvin / hass-integrations

My custom Home Assistant integrations
Apache License 2.0
61 stars 11 forks source link

Log Errors in HA 2024.5 #68

Closed VDRainer closed 3 months ago

VDRainer commented 4 months ago

Since HA 2024.5.1 my Log is filled with errors. Player seems to work without problems.

2024-05-05 11:54:10.578 ERROR (WSListener) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/srv/ha_py312/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 63, in _websocket_runner
    loop.run_until_complete(packethandler())
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/srv/ha_py312/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 54, in packethandler
    self._on_message(msg)
  File "/srv/ha_py312/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 69, in _on_message
    self._route_event(msg)
  File "/srv/ha_py312/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 93, in _route_event
    cb(neatdata)
  File "/home/homeassi/.homeassistant/custom_components/mopidy/speaker.py", line 1040, in __ws_stream_title_changed
    self.entity.force_update_ha_state()
  File "/home/homeassi/.homeassistant/custom_components/mopidy/media_player.py", line 238, in force_update_ha_state
    self.async_schedule_update_ha_state(force_refresh=True)
  File "/srv/ha_py312/lib/python3.12/site-packages/homeassistant/helpers/entity.py", line 1252, in async_schedule_update_ha_state
    self.hass.async_create_task(
  File "/srv/ha_py312/lib/python3.12/site-packages/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  File "/srv/ha_py312/lib/python3.12/site-packages/homeassistant/core.py", line 440, in verify_event_loop_thread
    frame.report(
  File "/srv/ha_py312/lib/python3.12/site-packages/homeassistant/helpers/frame.py", line 162, in report
    _report_integration(what, integration_frame, level, error_if_integration)
  File "/srv/ha_py312/lib/python3.12/site-packages/homeassistant/helpers/frame.py", line 203, in _report_integration
    raise RuntimeError(
RuntimeError: Detected that custom integration 'mopidy' calls async_create_task from a thread at custom_components/mopidy/media_player.py, line 238: self.async_schedule_update_ha_state(force_refresh=True). Please report it to the author of the 'mopidy' custom integration.
2024-05-05 11:54:14.129 WARNING (SyncWorker_15) [custom_components.mopidy.speaker] The websocket connection was interrupted, re-create connection
paszczaq commented 4 months ago

I can second that and also other errors are showing on HA OS 2024.5.X

Rejestrator: custom_components.mopidy.speaker
Źródło: custom_components/mopidy/speaker.py:973
integracja: Mopidy ([dokumentacja](https://github.com/bushvin/hass-integrations#mopidy), [Problemy](https://github.com/bushvin/hass-integrations/issues))
Pierwsze zdarzenie: 11:40:52 (2 zdarzenia)
Ostatnio zalogowany: 11:41:22

The websocket connection was interrupted, re-create connection
Rejestrator: homeassistant.helpers.frame
Źródło: helpers/frame.py:190
Pierwsze zdarzenie: 11:40:50 (2 zdarzenia)
Ostatnio zalogowany: 11:41:20

Detected that custom integration 'mopidy' calls async_create_task from a thread at custom_components/mopidy/media_player.py, line 238: self.async_schedule_update_ha_state(force_refresh=True), please report it to the author of the 'mopidy' custom integration
Rejestrator: root
Źródło: helpers/frame.py:203
Pierwsze zdarzenie: 11:40:50 (2 zdarzenia)
Ostatnio zalogowany: 11:41:20

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 63, in _websocket_runner
    loop.run_until_complete(packethandler())
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 54, in packethandler
    self._on_message(msg)
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 69, in _on_message
    self._route_event(msg)
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 93, in _route_event
    cb(neatdata)
  File "/config/custom_components/mopidy/speaker.py", line 1040, in __ws_stream_title_changed
    self.entity.force_update_ha_state()
  File "/config/custom_components/mopidy/media_player.py", line 238, in force_update_ha_state
    self.async_schedule_update_ha_state(force_refresh=True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1252, in async_schedule_update_ha_state
    self.hass.async_create_task(
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  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 'mopidy' calls async_create_task from a thread at custom_components/mopidy/media_player.py, line 238: self.async_schedule_update_ha_state(force_refresh=True). Please report it to the author of the 'mopidy' custom integration.
TNTLarsn commented 3 months ago
2024-05-25 16:57:53.114 WARNING (WSListener) [homeassistant.helpers.frame] Detected that custom integration 'mopidy' calls async_create_task from a thread at custom_components/mopidy/media_player.py, line 238: self.async_schedule_update_ha_state(force_refresh=True), please report it to the author of the 'mopidy' custom integration
2024-05-25 16:57:53.119 ERROR (WSListener) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 63, in _websocket_runner
    loop.run_until_complete(packethandler())
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 54, in packethandler
    self._on_message(msg)
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 69, in _on_message
    self._route_event(msg)
  File "/usr/local/lib/python3.12/site-packages/mopidyapi/wsclient.py", line 93, in _route_event
    cb(neatdata)
  File "/config/custom_components/mopidy/speaker.py", line 1093, in __ws_volume_changed
    self.entity.force_update_ha_state()
  File "/config/custom_components/mopidy/media_player.py", line 238, in force_update_ha_state
    self.async_schedule_update_ha_state(force_refresh=True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1252, in async_schedule_update_ha_state
    self.hass.async_create_task(
  File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
    self.verify_event_loop_thread("async_create_task")
  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 'mopidy' calls async_create_task from a thread at custom_components/mopidy/media_player.py, line 238: self.async_schedule_update_ha_state(force_refresh=True). Please report it to the author of the 'mopidy' custom integration.
bushvin commented 3 months ago

Fixed with commit ab219f6e802549fa2a5b297bc8fb9669574ba626