Skip to content

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

Open
@spacemanspiff2007

Description

@spacemanspiff2007

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn unexpected problem or unintended behavior of the Core

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions