workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

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

Open threepointone opened this issue 1 year ago • 4 comments

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 avatar Aug 22 '24 17:08 threepointone

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

threepointone avatar Aug 22 '24 17:08 threepointone

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

andyjessop avatar Aug 26 '24 13:08 andyjessop

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 avatar Aug 26 '24 13:08 threepointone

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

threepointone avatar Aug 26 '24 13:08 threepointone

can see these errors in CI runs as well image https://github.com/cloudflare/workers-sdk/actions/runs/11083408354/job/30797595264?pr=6859

threepointone avatar Sep 28 '24 11:09 threepointone

thanks @threepointone for calling this out -- we've seen some instances of this as well now 👍 we'll add this to the backlog

lrapoport-cf avatar Nov 11 '24 14:11 lrapoport-cf

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 image

threepointone avatar Dec 13 '24 16:12 threepointone