home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

Home Assistant WebSocket API - Unexpected exception #116866

Open perseus177 opened 1 week ago

perseus177 commented 1 week ago

The problem

Problem with playing music from Home Assistant to Google Home Mini

What version of Home Assistant Core has the issue?

core-2024.5.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Home Assistant WebSocket API

Link to integration documentation on our website

https://www.home-assistant.io/integrations/websocket_api/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Zdroj: components/websocket_api/commands.py:239
Integrácia: Home Assistant WebSocket API (dokumentácia, problémy)
Prvýkrát sa vyskytol: 16:17:46 (2 výskytov)
Naposledy prihlásený: 16:17:46

[2546456936] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 106, in wrapper
    return_value = func(self, *args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 514, in _quick_play
    quick_play(self._get_chromecast(), app_name, data)
  File "/usr/local/lib/python3.12/site-packages/pychromecast/quick_play.py", line 97, in quick_play
    controller.quick_play(**data, timeout=timeout)
  File "/usr/local/lib/python3.12/site-packages/pychromecast/controllers/media.py", line 559, in quick_play
    response_handler.wait_response()
  File "/usr/local/lib/python3.12/site-packages/pychromecast/response_handler.py", line 57, in wait_response
    raise RequestFailed(self._request)
pychromecast.error.RequestFailed: Failed to execute quick play http://192.168.0.176:8123/media/local/Hudba/Lubos/Pop/Vyber/Shawn%20Mendes%20-%20When%20You're%20Gone.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkZDcxNGJhODM0YTQ0YzEzOTQ2MTEwMjIwYzA5MWFhMyIsInBhdGgiOiIvbWVkaWEvbG9jYWwvSHVkYmEvTHVib3MvUG9wL1Z5YmVyL1NoYXduIE1lbmRlcyAtIFdoZW4gWW91J3JlIEdvbmUubXAzIiwicGFyYW1zIjpbXSwiaWF0IjoxNzE0OTE4NjYyLCJleHAiOjE3MTUwMDUwNjJ9.mfQ3INIAN82R3AEd0B19XUr98WyH_k0ejDw9MVh0kP8.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 783, in async_play_media
    await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 108, in wrapper
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: CastMediaPlayerEntity._quick_play Failed: Failed to execute quick play http://192.168.0.176:8123/media/local/Hudba/Lubos/Pop/Vyber/Shawn%20Mendes%20-%20When%20You're%20Gone.mp3?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkZDcxNGJhODM0YTQ0YzEzOTQ2MTEwMjIwYzA5MWFhMyIsInBhdGgiOiIvbWVkaWEvbG9jYWwvSHVkYmEvTHVib3MvUG9wL1Z5YmVyL1NoYXduIE1lbmRlcyAtIFdoZW4gWW91J3JlIEdvbmUubXAzIiwicGFyYW1zIjpbXSwiaWF0IjoxNzE0OTE4NjYyLCJleHAiOjE3MTUwMDUwNjJ9.mfQ3INIAN82R3AEd0B19XUr98WyH_k0ejDw9MVh0kP8.

Additional information

No response

home-assistant[bot] commented 1 week ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (websocket_api) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `websocket_api` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign websocket_api` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


websocket_api documentation websocket_api source (message by IssueLinks)

pieterdesomer commented 4 days ago

I have the same issue. Websocket API unexpected exception. SETUP: Home Assistant Green + Home Assistant SkyConnect USB Stick Renders all Zigbee devices non-functional. Restart fixes it. Have to restart every couple of hours.

Error log:

`Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/commands.py:239 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 5:04:53 PM (1 occurrences) Last logged: 5:04:53 PM

[281472865595456] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 64, in wrap_zigpy_exceptions yield File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 84, in wrapper return await RETRYABLE_REQUEST_DECORATOR(func)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/util.py", line 131, in retry return await func() ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zhaquirks/smartwings/wm25lz.py", line 54, in command return await super().command( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/quirks/init.py", line 228, in command return await self.request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/zcl/init.py", line 377, in request return await self._endpoint.request( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/endpoint.py", line 265, in request return await self.device.request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 339, in request await send_request() File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 841, in request await self.send_packet( File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 912, in send_packet raise zigpy.exceptions.DeliveryError( zigpy.exceptions.DeliveryError: Failed to enqueue message after 3 attempts: <EmberStatus.MAX_MESSAGE_LIMIT_REACHED: 114>

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/zha/cover.py", line 307, in async_set_cover_position res = await self._cover_cluster_handler.go_to_lift_percentage( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 83, in wrapper with wrap_zigpy_exceptions(): File "/usr/local/lib/python3.12/contextlib.py", line 158, in exit self.gen.throw(value) File "/usr/src/homeassistant/homeassistant/components/zha/core/cluster_handlers/init.py", line 75, in wrap_zigpy_exceptions raise HomeAssistantError(message) from exc homeassistant.exceptions.HomeAssistantError: Failed to send request: Failed to enqueue message after 3 attempts: <EmberStatus.MAX_MESSAGE_LIMIT_REACHED: 114>`

redlingg commented 4 days ago

Hi

I have the same issue: homeassistant.components.websocket_api.http.connection

Napló: homeassistant.components.websocket_api.http.connection Forrás: components/websocket_api/commands.py:239 integráció: Home Assistant WebSocket API (dokumentáció, problémák) Először fordult elő: 20:13:57 (2 Események) Utoljára naplózott: 20:26:35

[546799267520] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1078, in _async_admin_handler await result File "/usr/src/homeassistant/homeassistant/components/homeassistant/init.py", line 343, in async_handle_reload_all if errors := await conf_util.async_check_ha_config_file(hass): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config.py", line 1705, in async_check_ha_config_file res = await check_config.async_check_ha_config_file(hass) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/check_config.py", line 298, in async_check_ha_config_file p_validated = platform_schema(p_validated) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict return base_validate(path, iteritems(data), out) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 387, in validate_mapping cval = cvalue(key_path, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable return schema(data) ^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 603, in verify return cast(dict, schema(value)) ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 595, in validate_dict return base_validate(path, iteritems(data), out) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 387, in validate_mapping cval = cvalue(key_path, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 229, in _run return self._exec(self._compiled, value, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/validators.py", line 353, in _exec v = func(path, v) ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/voluptuous/schema_builder.py", line 818, in validate_callable return schema(data) ^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 896, in validator if key in config: ^^^^^^^^^^^^^ TypeError: argument of type 'NoneType' is not iterable

Any suggestion. I cannot check config yml. Cannot restart HA from UI.