Skip to content

WebSocket regression in v.2.5.1 #30757

@ansemjo

Description

@ansemjo

With the upgrade to Deno v.2.5.1, some WebSocket connections immediately fail with an Error without the request ever reaching the server, it seems. If I downgrade to v2.5.0 using sudo deno upgrade --version 2.5.0 it works as expected again.

Deno v2.5.1

$ deno
Deno 2.5.1
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> new WebSocket('ws://localhost:4080/api/provider/ws').addEventListener("error", err => console.error(err.error));
undefined
> NetworkError: failed to connect to WebSocket: Invalid status code: 400

Interestingly, the echo server works though:

new WebSocket('wss://echo.websocket.org').addEventListener("open", ok => console.log(ok.target.readyState));
undefined
> 1

I have no proxies configured but I would assume it has something to do with either #30700 or #30692?

Deno v2.5.0 (or earlier)

$ deno
Deno 2.5.0
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> new WebSocket('ws://localhost:4080/api/provider/ws').addEventListener("error", err => console.error(err.error));
undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions