"Some functionality can only be performed while handling a request" whenever running in a debugger
See original GitHub issueMy project runs fine using a regular start/dev command. However, whenever a debugger from VSCode or WebStorm attaches itself to the process, all requests subequently fail with
GET /myurl 500 Internal Server Error (22891.94ms)
[mf:err] GET /myurl: Error: Some functionality, such as asynchronous I/O (fetch, Cache API, KV), timeouts (setTimeout,
setInterval), and generating random values (crypto.getRandomValues, crypto.subtle.generateKey), can only be performed wh
ile handling a request.
I am 100% certain that my code is not doing any i/o outside of its main request handler. How can we help to reproduce this, as in #207 the same issue occurs?
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
CloudFlare Workers - some functionality can only be ...
I ran into it recently when tying to deploy what I thought should be a relatively simple function.
Read more >Debugging uncaught requests - Recipes - Mock Service Worker
Debugging uncaught requests · Enable onUnhandledRequest option · Examine the handlers · Verify the worker's scope · Run in debug mode.
Read more >In the VS Code "Debug Console", run a JavaScript await ...
The issue here is that running a microtask queue during a debug break heavily violates regular behavior of the web page. When you...
Read more >Manage exceptions with the debugger in Visual Studio
Tell the debugger to break when an exception is thrown ... The debugger can break execution at the point where an exception is...
Read more >Debugging in Visual Studio Code
Many debuggers support some of the following attributes: program - executable or file to run when launching the debugger; args - arguments passed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey! 👋 Thanks for reporting this. I’m able to reproduce it and will investigate further. Will aim to fix in the next release.
Hey again! Looks like this fix was released as part of Node
18.9.0
. Upgrading should resolve this issue! 🎉