workers-sdk
workers-sdk copied to clipboard
🐛 BUG: shutting down the dev server logs errors in console
Which Cloudflare product(s) does this pertain to?
Wrangler
What version(s) of the tool(s) are you using?
3.72.2
What version of Node are you using?
v20.14.0
What operating system and version are you using?
MacOS
Describe the Bug
Observed behavior
When runniing wrangler dev, and then shutting it down (either with the x hotkey, or by hitting ctrl-c, I'll get this error in my console
Expected behavior
There shouldn't be any errors.
Steps to reproduce
As mentioned above. It looks like a race condition with how we clean up the generated worker bundle.
Also note there's no log pointing out a path to a log file with more info.
@threepointone do you have a reproduction for this one? I don't see the same error.
It shows only occasionally, reproduces with a plain worker, nothing special. I'll keep an eye open, but I've been seeing it for at least a month (maybe more)
My guess is that miniflare/esbuild stays alive after the temp directory gets deleted while shutting down, and hence throws this error.
can see these errors in CI runs as well
https://github.com/cloudflare/workers-sdk/actions/runs/11083408354/job/30797595264?pr=6859
thanks @threepointone for calling this out -- we've seen some instances of this as well now 👍 we'll add this to the backlog
A similar error now happens during local dev on changing a file, and breaks the dev server for any future requests, which probably makes this more serious