Skip to content

fix(web_socket): name ws_max_receive_size when a message from Chrome exceeds it - #739

Merged
route merged 1 commit into
mainfrom
fix/oversized-message-error
Nov 27, 2026
Merged

route merged 1 commit into
mainfrom
fix/oversized-message-error

Conversation

@route

@route route commented Nov 27, 2026

Copy link
Copy Markdown
Member

A CDP message over :ws_max_receive_size (64 MiB by default) makes websocket-driver close the connection with code 1009, "WebSocket frame length too large". Ferrum dropped that reason and raised DeadBrowserError with its generic message, which says the browser crashed or was closed, and so did every later command on that browser. Nothing pointed at the limit or the option that raises it.

With Chrome sending a string result twice under deep serialization, evaluate now hits the default limit at about 32 MiB, so this is easier to run into than before.

WebSocket#on_close now sets the close reason when the code is 1009, and the error reads:

Browser sent a message larger than ws_max_receive_size (67108863 bytes), connection closed

…exceeds it

websocket-driver closes the connection with code 1009 when a message is over max_length, and Ferrum raised a
DeadBrowserError that said the browser crashed or was closed. The close reason now names ws_max_receive_size and its
value, for the failing command and every command after it.
@route
route force-pushed the fix/oversized-message-error branch from 4839ea2 to 9dfca08 Compare November 27, 2026 17:32
@route
route merged commit 95e81f0 into main Nov 27, 2026
6 of 7 checks passed
@route
route deleted the fix/oversized-message-error branch November 27, 2026 17:48
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