Build is successful but deploy fails to upload

The build process happens successfully but deploys are constantly failing on the last step - uploading assets. Log sample:
...
21:02:01.802 Uploading... (6555/13968)
21:02:08.818 Uploading... (6938/13968)
21:03:47.697 Uploading... (7293/13968)
21:03:50.771 /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:29573
21:03:50.771 throw a;
21:03:50.771 ^
21:03:50.771
21:03:50.772 FatalError: Failed to upload files. Please try again. Error: {"text":"Received a malformed response from the API","notes":[{"text":"<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js ie6 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if I... (length = 7177)"},{"text":"POST /pages/assets/upload -> 524 "}],"kind":"error","name":"APIError"})
21:03:50.772 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:149152:13
21:03:50.772 at processTicksAndRejections (node:internal/process/task_queues:96:5)
21:03:50.772 at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:148676:26) {
21:03:50.772 code: 1
21:03:50.772 }
21:03:50.830 Failed: upload process exited with code: 7
21:03:51.992 Failed: error uploading static assets. Check the logs above for more information. If this continues for an unknown reason, contact support: https://cfl.re/3WgEyrH
21:03:51.992 Error: Failed to publish assets. For support, join our Discord (https://discord.gg/cloudflaredev) or create a ticket and reference the deployment ID: a6c6d283-9ce8-4425-bf49-740216c86e02
...
21:02:01.802 Uploading... (6555/13968)
21:02:08.818 Uploading... (6938/13968)
21:03:47.697 Uploading... (7293/13968)
21:03:50.771 /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:29573
21:03:50.771 throw a;
21:03:50.771 ^
21:03:50.771
21:03:50.772 FatalError: Failed to upload files. Please try again. Error: {"text":"Received a malformed response from the API","notes":[{"text":"<!DOCTYPE html>\n<!--[if lt IE 7]> <html class=\"no-js ie6 oldie\" lang=\"en-US\"> <![endif]-->\n<!--[if I... (length = 7177)"},{"text":"POST /pages/assets/upload -> 524 "}],"kind":"error","name":"APIError"})
21:03:50.772 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:149152:13
21:03:50.772 at processTicksAndRejections (node:internal/process/task_queues:96:5)
21:03:50.772 at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:148676:26) {
21:03:50.772 code: 1
21:03:50.772 }
21:03:50.830 Failed: upload process exited with code: 7
21:03:51.992 Failed: error uploading static assets. Check the logs above for more information. If this continues for an unknown reason, contact support: https://cfl.re/3WgEyrH
21:03:51.992 Error: Failed to publish assets. For support, join our Discord (https://discord.gg/cloudflaredev) or create a ticket and reference the deployment ID: a6c6d283-9ce8-4425-bf49-740216c86e02
This is now happening very frequently and randomly. Any ideas?
17 Replies
Erisa
Erisa5mo ago
I escalated this, someone from the team will take a look when they can
Jorge
Jorge5mo ago
Hi @Erisa any updates on this, please? Thanks.
Erisa
Erisa5mo ago
Did you get any messages from anyone in support? 🤔 I saw the escalation was acknowledged but there wasn't any further updates, not sure what happened
sgraband
sgraband5mo ago
Hey @Erisa, we have exactly the same issue, but it happens with every build. Is the escalation for a global fix or just for specific persons? If the latter could you also escalate my ticket number (3303831 )?
Erisa
Erisa5mo ago
I will re-escalate and include that ticket number 👍 I was told you should have had a reply on that ticket now
sgraband
sgraband5mo ago
Yes i got an answer that they'll look into it. Thank you!
Jorge
Jorge4w ago
Hi @sgraband were you able to fix your issue? We're still getting it from time to time. Would you mind sharing your resolution, please? Thanks Hi @Erisa could you please escalate this one for us?
Erisa
Erisa4w ago
I thought I already did, but do you have a recent deployment ID @Jorge?
HighFlyingDwarf
@Jorge You should have received a ticket number for the new system. Do you happen to have that?
Jorge
Jorge4w ago
@Liam C | CSUP where should I have received that? Email? What do you mean by "new system"? @Erisa @Liam C | CSUP any updates?
HighFlyingDwarf
@Jorge It should have been via email yes. Sorry, I think I've misunderstood the situation here. Have you raised a ticket previously on our support platform about this or is this the only place you've reported this issue? @Jorge Either way, we need to escalate this to our engineering team so this is getting raised with them.
Jorge
Jorge4w ago
I've just raised a ticket on the support platform about this earlier today. Previously to that I was relying on the support from here, the Discord channel. Case Number (support platform ticket): 01204634 Could you please help escalating this? Thanks.
HighFlyingDwarf
Okay thanks. We'll get this passed along
Jorge
Jorge3w ago
Hi @Liam C | CSUP, sorry to bother you again but this is becoming very serious, and we haven't heard anything from support yet. We have a Business account, and we're hoping we could get some direction on how to solve this. It's now affecting almost all deployments. Could we please look into it? Thank you.
HighFlyingDwarf
@Jorge I understand the urgency. We are dealing with a high volume of cases currently but the case has been escalated and once our engineering team have taken a look we will get back to you. One thing I would suggest in the meantime if you haven't enabled it already is Build Caching. This might alleviate the behaviour you're seeing. https://developers.cloudflare.com/pages/configuration/build-caching/
Cloudflare Docs
Build caching | Cloudflare Pages docs
Improve Pages build times by turning on build caching to restore dependencies and build output between builds. The first build to occur after enabling build caching on your Pages project will save to cache. Every subsequent build will restore from cache unless configured otherwise.
Jorge
Jorge3w ago
Thanks, @Liam C | CSUP . We tried that a week ago but it didn't work. We're still experiencing the issue and our deployment to production continues to be extremely unstable and unreliable.
Want results from more Discord servers?
Add your server