`wrangler deploy` often fails with `fetch` errors
What versions & operating system are you using?
System: OS: macOS 26.1 CPU: (14) arm64 Apple M4 Max Memory: 1.20 GB / 36.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.7.0 - /Users/leebenson/.nvm/versions/node/v24.7.0/bin/node npm: 11.5.1 - /Users/leebenson/.nvm/versions/node/v24.7.0/bin/npm pnpm: 10.13.1 - /opt/homebrew/bin/pnpm bun: 1.3.2 - /Users/leebenson/.bun/bin/bun Watchman: 2025.06.23.00 - /opt/homebrew/bin/watchman npmPackages: @cloudflare/vite-plugin: catalog: => 1.13.13 wrangler: catalog: => 4.49.1
Please provide a link to a minimal reproduction
n/a
Describe the Bug
I've hit this frequently over the past 2 weeks.
Attempting to deploy a worker with wrangler deploy often results in errors such as:
TypeError: fetch failed
at fetch (/Volumes/dev/gh/node_modules/.bun/[email protected]+80763641bee7cf20/node_modules/wrangler/wrangler-dist/cli.js:31913:17)
at async performApiFetch (/Volumes/dev/gh/node_modules/.bun/[email protected]+80763641bee7cf20/node_modules/wrangler/wrangler-dist/cli.js:119401:10)
at async fetchInternal (/Volumes/dev/gh/node_modules/.bun/[email protected]+80763641bee7cf20/node_modules/wrangler/wrangler-dist/cli.js:119421:20)
at async fetchResult (/Volumes/dev/gh/node_modules/.bun/[email protected]+80763641bee7cf20/node_modules/wrangler/wrangler-dist/cli.js:119613:47)
at async doUpload (/Volumes/dev/gh/node_modules/.bun/[email protected]+80763641bee7cf20/node_modules/wrangler/wrangler-dist/cli.js:248974:25)
at async /Volumes/dev/gh/node_modules/.bun/[email protected]+80763641bee7cf20/node_modules/wrangler/wrangler-dist/cli.js:126108:30
This number of assets uploaded in this particular project is usually around 100.
It fails on different files each time, typically after successfully uploading around half of them.
I have been able to repro this with other team members in different geographies, so I suspect it's unlikely to be related to my own connection or the specific API intake.
Please provide any relevant error logs
No response
Hi @leebenson 👋
Thanks for the issue, I just tried reproducing it by creating a simple worker with more than 100 (medium size) asset files and I couldn't reproduce it.
Are you still experiencing the issue?
if you are, if you could share a minimal reproduction here that would be ideal, although I suspect that that might not be possible, if it isn't could you run wrangler deploy with WRANGLER_LOG=debug and your project and share here the output? (PS: also if it's not too noisy and it doesn't contain, or you can remove, informations you don't want to share, if you could also set WRANGLER_LOG_SANITIZE=false that would be even better).
I always get error "X [ERROR] fetch failed".
My package is "wrangler": "^4.4.0"
But when I "deploy": "wrangler deploy --minify" => always use ⛅️ wrangler 4.51.0
I created project by CLI: npm create hono@latest
=> If you would like to reproduce, could you please create project by Hono CLI
The error detail:
deploy wrangler deploy --minify
⛅️ wrangler 4.51.0 ───────────────────
X [ERROR] fetch failed
If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose √ Would you like to report this error to Cloudflare? Wrangler's output and the error details will be shared with the Wrangler team to help us diagnose and fix the issue. ... yes 🪵 Logs were written to "C:\Users<username>\AppData\Roaming\xdg.config.wrangler\logs\wrangler-2025-12-03_01-40-25_962.log"
Process finished with exit code 1
Are you still experiencing the issue?
Yes, I'm still experiencing it intermittently. It's a bit of a heisenbug. I've been able to recreate it occasionally on a colleague's machine where he was based in NYC and I'm in Toronto by running wrangler deploy several times.
It also seems to work more consistently (perhaps always, I haven't explicitly logged) when using Cloudflare Warp.
I'll be working on deployments a fair amount this week so I'll set the env vars you suggested if I run into it again and provide a dump.
Hi @leebenson - Did you find out any more? Is this still a problem for you? If so, could you create a reproduction repository for us to test?
@petebacondarwin I've been hitting the error, TypeError: fetch failed regularly for months. For me deployment fails 9/10 times on my OpenNext sites and 2/3 times on my Hono backend. For OpenNext, it most often fails when it's populating the R2 incremental cache, but can also fail when uploading other assets. I tried to reproduce it with a starter template and couldn't, but I could put one of my informational websites into a public repo to share with you. Let me know if you want me to post that here or create a new issue.