Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving WebSocket message over size limit throws generic runtime error #2667

Open
dpeek opened this issue Sep 6, 2024 · 0 comments
Open

Comments

@dpeek
Copy link

dpeek commented Sep 6, 2024

While capturing a screenshot using @cloudflare/puppeteer and a remote Chrome instance, I got the following uncatchable errors from the runtime:

Uncaught (in promise) Error: internal error
Uncaught (async) Error: internal error

Running wrangler dev --log-level debug revealed the source of the error, the resulting image was too large to send as a WebSocket message:

workerd/jsg/util.c++:276: error: e = kj/compat/http.c++:5740: failed: WebSocket protocol error; protocolError.statusCode = 1009; protocolError.description = Message is too large: 2415121 > 1048576

It would be helpful if the resulting runtime error was more specific.

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

No branches or pull requests

1 participant