Cloudflare Pages failed to upload files - "kind":"error","name":"APIError"

Hi everyone,

I’m reaching out for some assistance with an error I encountered while deploying my Hugo site to Cloudflare Pages. The deployment ID for reference is 939cc2a3-3d48-4d34-8fba-67d3d642d9f5.

Here’s a log of the issue:

21:56:36.045 Uploading… (3674/13153)
21:56:42.295 /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:29573
21:56:42.295 throw a;
21:56:42.295 ^
21:56:42.295
21:56:42.295 FatalError: Failed to upload files. Please try again. Error: {“text”:“Received a malformed response from the API”,“notes”:[{“text”:“\n\n<!–[if I… (length = 7176)”},{“text”:"POST /pages/assets/upload → 524 "}],“kind”:“error”,“name”:“APIError”})
21:56:42.295 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:149152:13
21:56:42.296 at processTicksAndRejections (node:internal/process/task_queues:96:5)
21:56:42.296 at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:148676:26) {
21:56:42.296 code: 1
21:56:42.296 }
21:56:42.347 Failed: upload process exited with code: 7



I’ve already tried the following:

  • Retrying the deployment (in case it was a temporary issue).
  • Using Wrangler locally to upload build files (but this also failed).
  • Deleting the entire Cloudflare Pages project and starting from scratch (unfortunately, the issue persists).

Unfortunately, the issue persists.

Thanks in advance for your help!

Hi,

I am looking into this now.

We are tracking this as an incident on our statuspage, thanks for the reports:
https://www.cloudflarestatus.com/incidents/r5zhfpm31kwp

This should be resolved, let us know if you see it again

I’m still having the issue:
deployment ID: d9a790df-f5bb-493d-8100-c014a2402465

14:33:27.829	Uploading... (3897/13694)
14:33:38.462	/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:29573
14:33:38.462	            throw a;
14:33:38.462	            ^
14:33:38.463	
14:33:38.463	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 = 7176)"},{"text":"POST /pages/assets/upload -> 524 "}],"kind":"error","name":"APIError"})
14:33:38.463	    at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:149152:13
14:33:38.463	    at processTicksAndRejections (node:internal/process/task_queues:96:5)
14:33:38.463	    at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:148676:26) {
14:33:38.463	  code: 1
14:33:38.463	}
14:33:38.512	Failed: upload process exited with code: 7
14:33:39.467	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
14:33:39.467	Error: Failed to publish assets. For support, join our Discord (https://discord.gg/cloudflaredev) or create a ticket and reference the deployment ID: d9a790df-f5bb-493d-8100-c014a2402465

We are also having the same issue from yesterday.

1 Like

The issue still persists.

15:37:22.747 /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:29573
15:37:22.747 throw a;
15:37:22.748 ^
15:37:22.748
15:37:22.748 FatalError: Failed to upload files. Please try again. Error: {text:Received a malformed response from the API,notes:[{text:\n\n<!–[if I… (length = 7176)},{text:POST /pages/assets/upload → 524 }],kind:error,name:APIError})
15:37:22.748 at /opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:149152:13
15:37:22.748 at processTicksAndRejections (node:internal/process/task_queues:96:5)
15:37:22.748 at async run (/opt/pages/build_tool/js/node_modules/wrangler/wrangler-dist/cli.js:148676:26) {
15:37:22.748 code: 1
15:37:22.748 }
15:37:22.788 Failed: upload process exited with code: 7
15:37:24.023 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
15:37:24.023 Error: Failed to publish assets. For support, join our Discord (Cloudflare Developers) or create a ticket and reference the deployment ID: 570a346e-b0bf-43af-8fc9-3eafc3351a56
2 Likes

Sorry to hear this and thanks for letting us know, I will be opening a ticket under your account so we can investigate further.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.