Skip to content

[BUG] JS client does not receive messages if both polling ad websocket transports are configured #156

@mabi

Description

@mabi

Description

Using JS client Socket.IO v4.8.3
const socket = io('https://myserver:8443/terminal');
without specifying transports, so by default:
Default value: ["polling", "websocket", "webtransport"]
or specifying { transports: ["polling", "websocket"] }
in the server side logs I see the client connection event and then after the first message sent from the server I see the disconnect event.
On the client side the connection is reported established.
No message is received.
Messages sent from the client are logged in the websocket but not received from the server.

If I enable just one transport at a time i.e. :
const socket = io('https://myserver:8443/terminal', { transports: ["websocket"] });
or
const socket = io('https://myserver:8443/terminal', { transports: ["polling"] });
[EDIT] everything works receiving messages works, sending messages does not work for websocket, works with polling

Steps to Reproduce

  1. connect using a JS browser client to a namespace using defaults
  2. from the server send a message to the namespace

Expected Behavior

Messages are received

Actual Behavior

No message received

Environment

  • Java Version: 17
  • OS: Windows
  • Netty-SocketIO Version: 4.0.0-alpha commit fddd5d1
  • Module: core/spring

Code Example

const socket = io('https://myserver:8443/terminal');

Logs/Stack Trace

N/A

Additional Context

WSS is used

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions