Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Websockets] Sending a slightly bigger messages causes websockets connection to unexpectedly terminate #4587

Open
spacemanspiff2007 opened this issue Feb 4, 2025 · 0 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@spacemanspiff2007
Copy link
Contributor

Send this message but replace AAAAAA in payload with 129_702 x A and create proper json-in-json.
(I can provide the proper message if necessary but imho it's trivial to create so I chose to not post it here - just let me know)

{
  "topic": "openhab/items/TestImage/state", 
  "source": "HABApp", 
  "eventId": "238", 
  "type": "ItemStateEvent", 
  "payload": {
    "type": "Raw", 
    "value": "data:image/jpeg;base64,/9j/AAAAAA="
  }
}

Watch Websocket connection die unexpectedly

[re.io.websocket.event.EventWebSocket] - WebSocket error: Text message size [129876] exceeds maximum size [65536]

Websocket close code is 1000 which indicates Normal Closure. The correct close code would be 1009.
Also the exception text should be send with the close code (currently nothing is send).

[HABApp.connection.openhab]    DEBUG | Websocket closed: 1000 None

If it's not possible to to make the maximum message size dynamically then there should be a configuration option for the max message size.

@spacemanspiff2007 spacemanspiff2007 added the bug An unexpected problem or unintended behavior of the Core label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

1 participant