cloudflare / cloudflare/workers-sdk
🐛 BUG: slow internet connection causes crashes
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.5k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 187
Description
### Which Cloudflare product(s) does this pertain to?
Pages
### What version(s) of the tool(s) are you using?
wrangler 3.26.0
### What version of Node are you using?
v20.11.0
### What operating system and version are you using?
Mac Sonoma 14.3
### Describe the Bug
### Observed behavior
```
/Users/user/Desktop/projects/project/node_modules/wrangler/wrangler-dist/cli.js:29572
throw a;
^
FatalError: Failed to upload files. Please try again. Error: {"text":"Received a malformed response from the API","notes":[{"text":"Expired JWT"},{"text":"POST /pages/assets/upload -> 403 Forbidden"}],"kind":"error","name":"APIError"})
at /Users/user/Desktop/projects/project/node_modules/wrangler/wrangler-dist/cli.js:147236:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (/Users/users/Desktop/projects/project/node_modules/wrangler/wrangler-dist/cli.js:146760:26) {
code: 1
}
```
In essence, because of my slow internet and just a few large uploads, I am never able to publish my website to Cloudflare pages.
### Expected behavior
Uploads all files successfully. Allow for resuming uploads or refreshing the JWT or increasing the JWT timeout.
### Steps to reproduce
1. Have a slow internet connect.
1. Have a plain static site with say 10 large images that are 20mb each.
1. Run `npx wrangler pages deploy dist`
### Please provide a link to a minimal reproduction
_No response_
### Please provide any relevant error logs
```
/Users/user/Desktop/projects/project/node_modules/wrangler/wrangler-dist/cli.js:29572
throw a;
^
FatalError: Failed to upload files. Please try again. Error: {"text":"Received a malformed response from the API","notes":[{"text":"Expired JWT"},{"text":"POST /pages/assets/upload -> 403 Forbidden"}],"kind":"error","name":"APIError"})
at /Users/user/Desktop/projects/project/node_modules/wrangler/wrangler-dist/cli.js:147236:13
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async run (/Users/users/Desktop/projects/project/node_modules/wrangler/wrangler-dist/cli.js:146760:26) {
code: 1
}
```
Contributor guide
Assessment
This issue has not been assessed yet.