mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
Reported with Browser Control (CLI 0.8.3, extension 0.0.25), whose relay this is: the relay crashed on startup with "unhandled RangeError: Max payload size exceeded (WS_ERR_UNSUPPORTED_MESSAGE_LENGTH)" when the extension sent an oversized message, and kept crashing until the extension was reloaded. ws closes a socket that exceeds maxPayload (100 MiB by default) and reports it as an "error" event on that socket. The relay had no "error" listener on the extension or CDP client sockets, so Node treated the event as unhandled and the process died; the extension reconnected, resent, and crashed it again. - The relay accepts messages up to 256 MiB, as Playwright's own CDP client does (large screenshots and response bodies come close to 100 MiB). - The extension and CDP client sockets, and the HTTP server after it starts listening, log errors to relay.log (extension.error, client.error, http.error) instead of crashing; ws then closes the offending socket. - The extension checks the size of what it sends (UTF-8 bytes, measured only when the text could be over the limit, and tolerating a result too large to serialize): an oversized command result fails that one command with "Result too large to send ... request less data" instead of breaking the connection and every command in flight; an oversized event is dropped and logged. Verified against a relay and a headless Chrome on an isolated port: a 240 MB CDP result now passes (it crashed the relay before); a client message over 256 MiB makes the relay log client.error and close that socket with 1009 while it stays up; an earlier 200 MB cap answered 210 MB with the "Result too large" error. A result over ~256 MB crashes the extension's own process in Chrome before it reaches this code (the relay stays up); that is a browser limit. |
||
|---|---|---|
| .. | ||
| ai | ||
| app | ||
| browser-extension | ||
| cli | ||
| client | ||
| codemode | ||
| console | ||
| containers | ||
| core | ||
| desktop | ||
| effect-drizzle-sqlite | ||
| function | ||
| gui-extensions | ||
| http-recorder | ||
| httpapi-codegen | ||
| identity | ||
| latex | ||
| merman | ||
| plugin | ||
| plugin-browser | ||
| plugins | ||
| posts | ||
| protocol | ||
| schema | ||
| script | ||
| sdk | ||
| server | ||
| session-ui | ||
| simulation | ||
| stats | ||
| storybook | ||
| theme | ||
| tui | ||
| ui | ||
| util | ||
| web | ||