-
Notifications
You must be signed in to change notification settings - Fork 673
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
bug: node 18 breaks wrangler2 when experimental fetch
is enabled
#834
Comments
This is where we construct the form: https://github.com/cloudflare/wrangler2/blob/main/packages/wrangler/src/create-worker-upload-form.ts This is where we upload it during This is where we upload it during Nothing special, tbh. |
Strange... it's possible there's some strange interaction with the version of undici that's bundled into 18.0.0 but that would still be weird. Let me know if you're able to narrow it down a bit more and I'll see if I can find the specific change in 18.0.0 that caused it |
Oh interesting! That is what I was guessing... Figured it would be the least likely cause though. |
There's some interference between our data fetching library `undici` and node 18's new `fetch` and co. (powered by `undici` internally) which replaces the finename pf`File`s attached to `FormData`swith a generic `blob` (likely this code - https://github.com/nodejs/undici/blob/615f6170f4bd39630224c038d1ea5bf505d292af/lib/fetch/formdata.js#L246-L250). It's still not clear why it does so, and it's hard to make an isolated example of this. Regardless, disabling the new `fetch` functionality makes `undici` use its own base classes, avoiding the problem for now, and unblocking our release. We'll keep investigating and look for a proper fix. Unblocks #834
There's some interference between our data fetching library `undici` and node 18's new `fetch` and co. (powered by `undici` internally) which replaces the filename of `File`s attached to `FormData`s with a generic `blob` (likely this code - https://github.com/nodejs/undici/blob/615f6170f4bd39630224c038d1ea5bf505d292af/lib/fetch/formdata.js#L246-L250). It's still not clear why it does so, and it's hard to make an isolated example of this. Regardless, disabling the new `fetch` functionality makes `undici` use its own base classes, avoiding the problem for now, and unblocking our release. We'll keep investigating and look for a proper fix. Unblocks #834
There's some interference between our data fetching library `undici` and node 18's new `fetch` and co. (powered by `undici` internally) which replaces the filename of `File`s attached to `FormData`s with a generic `blob` (likely this code - https://github.com/nodejs/undici/blob/615f6170f4bd39630224c038d1ea5bf505d292af/lib/fetch/formdata.js#L246-L250). It's still not clear why it does so, and it's hard to make an isolated example of this. Regardless, disabling the new `fetch` functionality makes `undici` use its own base classes, avoiding the problem for now, and unblocking our release. We'll keep investigating and look for a proper fix. Unblocks #834
fetch
is enabled
I landed a workaround that adds |
We'd previously had some funny behaviour with undici clashing with node's own fetch supporting classes, and had turned off node's fetch implementation. Recent updates to undici appear to have fixed the issue, so let's turn it back on. Closes #834
We'd previously had some funny behaviour with undici clashing with node's own fetch supporting classes, and had turned off node's fetch implementation. Recent updates to undici appear to have fixed the issue, so let's turn it back on. Closes #834
Something about node 18 breaks wrangler's form upload, leading to this error when we try to upload the worker definition
You can reproduce this by installing node 18, and running either
wrangler dev
orwrangler publish
. All the other api calls seem fine, it's just this one critical api call.Working on this, filing the issue to get visibility.
The text was updated successfully, but these errors were encountered: