-
Notifications
You must be signed in to change notification settings - Fork 326
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
devtools/vscode debugging fails kj/compat/http.c with Message is too large (>1MB) #1563
Comments
Since this is for debugging only, we don't really need to be so strict. Fixes #1563.
Oh this looks like an easy fix -- #1573. |
Wow - so much appreciated! |
I still get this in v1.20240404.0, which is super-strange. The inspector service closes down and devtools (chrome / vscode) hangs. From the code, it looks like it should be fixed.
Also, when the error is reported, it prints garbage, since the
|
After a bit of debugging - it seems this happens for capn-protoed cdp messages between workerd:s?. I have a setup with a bunch of DurableObjects (<20) - if I reduce the number of registered namespaces, everything works. |
Using either the remix cloudflare workers or pages template out of box on WSL2 linux. Trying to debug locally, setting a breakpoint. Breakpoint is hit, but then emits the error listed below, after which the session is broken. Chrome devtools and vscode run into the same issue.
After investigating, it seems to have to have to do with the size of certain chunks that remix emits, as well as map files, which are clearly greater than 1MB. Apparently these are sent via WebSocket? Minifying the build reduced that file to under 300K, and debugging breakpoints works again.
Can't find a way to ask remix to chunk that piece any smaller. Would it make sense when running locally to allow larger messages to improve the worker/pages developer experience? Even if behind an option/flag?
✘ [ERROR] workerd/jsg/util.c++:281: error: e = kj/compat/http.c++:5618: failed: WebSocket protocol error; protocolError.statusCode = 1009; protocolError.description = Message is too large: 2157260 > 1048576
stack: /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35bf930 /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35bfb7a /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@48f24cf /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2c10ba0 /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@35dddc0 /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2c10ba0 /home/david/github/plg-perf-app-cfp/node_modules/@cloudflare/workerd-linux-64/bin/workerd@2e1932c; sentryErrorContext = jsgInternalError
The text was updated successfully, but these errors were encountered: