cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.58k stars 663 forks source link

🐛 BUG: shutting down the dev server logs errors in console #6562

Open threepointone opened 3 weeks ago

threepointone commented 3 weeks ago

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

image

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.

threepointone commented 3 weeks ago

Also note there's no log pointing out a path to a log file with more info.

andyjessop commented 2 weeks ago

@threepointone do you have a reproduction for this one? I don't see the same error.

threepointone commented 2 weeks ago

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)

threepointone commented 2 weeks ago

My guess is that miniflare/esbuild stays alive after the temp directory gets deleted while shutting down, and hence throws this error.