Skip to content

fix(websocket): add protocolVersion to socket.io auth - #250

Merged
takker99 merged 1 commit into
mainfrom
fix/socket-protocol-version
Nov 1, 2026
Merged

takker99 merged 1 commit into
mainfrom
fix/socket-protocol-version

Conversation

@takker99

@takker99 takker99 commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cosense client now sends auth: { protocolVersion: 2 } when creating the socket.io connection.
  • Update connect() to include the same auth payload so the server accepts the connection.

Background

Since 2026-11-01, Cosense's websocket server rejects connections whose CONNECT packet lacks { protocolVersion: 2 }, responding with 41 (disconnect). This was confirmed by inspecting the Cosense client bundle (chunk-JXZKUJ3K.js), where socket creation uses auth: { protocolVersion: 2 }.

Changes

  • websocket/socket.ts: add auth: { protocolVersion: 2 } to io() options.

Test

  • deno task check passes (fmt, lint, tests).

@takker99
takker99 merged commit c4c20ba into main Nov 1, 2026
5 checks passed
@takker99
takker99 deleted the fix/socket-protocol-version branch November 1, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant