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
71.45k stars 29.9k forks source link

Received binary message for non-existing handler [1/2/3/4] #104917

Open adamf83 opened 9 months ago

adamf83 commented 9 months ago

The problem

When using the assist functionality in HA I’ve noticed that my logs are filling up with the following error:

Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:150 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 21:20:07 (5097 occurrences) Last logged: 21:27:46

[140563455572416] Received binary message for non-existing handler 2 [140563455572416] Received binary message for non-existing handler 3 [140563455572416] Received binary message for non-existing handler 4 [140563007852992] Received binary message for non-existing handler 1 [140563007852992] Received binary message for non-existing handler 2

In the space of running one command I had over 3000 errors. I’m not exactly sure if something isn’t working, but I shouldn’t be getting 3000+ errors.

What version of Home Assistant Core has the issue?

core-2023.11.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

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?

No response

Additional information

No response

home-assistant[bot] commented 9 months 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)

antisane commented 9 months ago

Seeing the same, only difference being that it's only "1" for me at the end of the error (no "2", "3", etc). Also, this started showing up right after I upgraded core to 2023.11.3 this morning.

Core 2023.11.3

Supervisor 2023.11.6

Operating System 11.2

Frontend 20231030.2

Claudio1L commented 9 months ago

not sure if the same issue, but from 2023.12 started with websocket errors like: [140124016572352] Received invalid command: {'access_token': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJmYjg3NmMyNTg5NDI0OGExYWU4NTRjZTVmNGQ4ZmEzOCIsImlhdCI6MTcwMjI4NTk4MywiZXhwIjoxNzAyMjg3NzgzfQ.GLvyfho8wQCOLH0FT-IIqSOqPalz-gMfxBi8FoeuL_Q', 'type': 'auth'}

Core 2023.12.1 Supervisor 2023.11.6 Operating System 11.2 Frontend 20231208.2

Herzblut21 commented 8 months ago

Bei mir ist der Fehler: [140279515426112] Error handling message: length of value must be at least 1 for dictionary value @ data['statistic_ids']. Got [] (invalid_format) Sven from 192.168.1.22 (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36)

Sonic62 commented 8 months ago

Détails du journal (ERREUR) Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:301 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 00:30:17 (2 occurrences) Last logged: 00:49:18

[140413019282368] Error handling message: length of value must be at least 1 for dictionary value @ data['statistic_ids']. Got [] (invalid_format) Mario from 10.10.0.78 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36) [140412007501376] Error handling message: length of value must be at least 1 for dictionary value @ data['statistic_ids']. Got [] (invalid_format) Mario from 10.10.0.78 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36)

celodnb commented 5 months ago

I'm also receiving the same, and have actually been for some time...

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:167
integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 19:16:04 (50 occurrences)
Last logged: 19:16:10

[139836798769856] Received binary message for non-existing handler 1
pprazzi commented 3 months ago

I have the same error, it has to do something when using the companion app on MacOS using the assist functionality. It works when using home assistant assist from a browser, but not from the companion app.

I use nabu casa btw

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:167
integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 13:57:57 (850 occurrences)
Last logged: 14:54:27

[139649025566784] Received binary message for non-existing handler 3
[139649002180800] Received binary message for non-existing handler 1
[139649002180800] Received binary message for non-existing handler 2
[139649002715968] Received binary message for non-existing handler 1
[139648868149824] Received binary message for non-existing handler 1
jhemak commented 3 months ago

Same issue here, on 2024.6.1

e3e6 commented 1 month ago

Same issue here. This error log occurs when using voice assistant from the Android companion app.

Core 2024.7.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

Homeassistant companion app on Android 13

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:167
integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 13:13:32 (1 occurrences)
Last logged: 13:13:32

[547277048704] Received binary message for non-existing handler 1

Might be related to #92307, but it was never resolved.

unhuzpt commented 4 days ago

`Logger: homeassistant.components.websocket_api.http.connection Source: components/websocket_api/connection.py:167 integration: Home Assistant WebSocket API (documentation, issues) First occurred: 6:58:49 AM (9 occurrences) Last logged: 7:02:59 AM

[140183798152304] Received binary message for non-existing handler 5
[140183798152304] Received binary message for non-existing handler 6
[140183798152304] Received binary message for non-existing handler 7
[140183798152304] Received binary message for non-existing handler 9
[140183798152304] Received binary message for non-existing handler 11`