An unknown error occured. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH.

Background I made changes to my Next.js project. I found out which lines cause the script to throw an error, but I don't understand why. So, I am blind trying to navigate on an unknown path. My deployment command is:
pnpm next-on-pages && pnpm wrangler pages deploy
pnpm next-on-pages && pnpm wrangler pages deploy
Problem The error I receive after trying running the deployment command:
✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Uploading _routes.json
80
✘ [ERROR] A request to the Cloudflare API (/accounts/10588302399247a4add0cce49f3d28ee/pages/projects/e303-dk/deployments) failed.

An unknown error occured. Contact your account team or Cloudflare
support: https://cfl.re/3WgEyrH. [code: 8000000]
✨ Compiled Worker successfully
✨ Uploading Worker bundle
✨ Uploading _routes.json
80
✘ [ERROR] A request to the Cloudflare API (/accounts/10588302399247a4add0cce49f3d28ee/pages/projects/e303-dk/deployments) failed.

An unknown error occured. Contact your account team or Cloudflare
support: https://cfl.re/3WgEyrH. [code: 8000000]
Environment Account ID: 10588302399247a4add0cce49f3d28ee
// package.json
"wrangler": "^3.65.1" (latest)
"@cloudflare/next-on-pages": "^1.12.1", (latest)
"@cloudflare/workers-types": "^4.20240718.0", (latest)
// package.json
"wrangler": "^3.65.1" (latest)
"@cloudflare/next-on-pages": "^1.12.1", (latest)
"@cloudflare/workers-types": "^4.20240718.0", (latest)
Question 1. How can I see the error in detail? Because this generic error 2. Could someone please help me in general related to this error, because I am extremely confused and frustrated. I received this error maybe 20 times today. At this point, I have to commit 1 function and re-run the deployment to see if it will throw an error. It takes ages to make any progress.
8 Replies
lettucebaran
lettucebaran2mo ago
Wrangler's log on my local machine
--- 2024-07-21T13:10:16.212Z log
✨ Uploading _routes.json
---

--- 2024-07-21T13:10:16.212Z debug
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/10588302399247a4add0cce49f3d28ee/pages/projects/e303-dk/deployments
---

--- 2024-07-21T13:10:16.212Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:16.212Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:16.212Z debug
-- END CF API REQUEST
---

--- 2024-07-21T13:10:34.849Z debug
-- START CF API RESPONSE: Internal Server Error 500
---

--- 2024-07-21T13:10:34.849Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:34.849Z debug
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:34.849Z debug
-- END CF API RESPONSE
---

--- 2024-07-21T13:10:34.852Z debug
failed: APIError: A request to the Cloudflare API (/accounts/10588302399247a4add0cce49f3d28ee/pages/projects/e303-dk/deployments) failed.
--- 2024-07-21T13:10:16.212Z log
✨ Uploading _routes.json
---

--- 2024-07-21T13:10:16.212Z debug
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/10588302399247a4add0cce49f3d28ee/pages/projects/e303-dk/deployments
---

--- 2024-07-21T13:10:16.212Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:16.212Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:16.212Z debug
-- END CF API REQUEST
---

--- 2024-07-21T13:10:34.849Z debug
-- START CF API RESPONSE: Internal Server Error 500
---

--- 2024-07-21T13:10:34.849Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:34.849Z debug
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2024-07-21T13:10:34.849Z debug
-- END CF API RESPONSE
---

--- 2024-07-21T13:10:34.852Z debug
failed: APIError: A request to the Cloudflare API (/accounts/10588302399247a4add0cce49f3d28ee/pages/projects/e303-dk/deployments) failed.
I only get "Internal Server Error 500" I try to deploy another page, it has a few lines. The functions that I import are reused in already deployed pages. But for an unknown reason, when I try to add this page and deploy, then I get this error. When I remove this page, I can deploy my page 🤷
Erisa
Erisa2mo ago
It's one of those frustrating errors that requires someone at Cloudflare to look up what happened, and the cause is impossible to predict because that code literally means that something happened which is unknown / has no error handling
lettucebaran
lettucebaran2mo ago
how can i contact someone so they can look into it?
Erisa
Erisa2mo ago
I'll escalate this thread to Support and they'll look when available
lettucebaran
lettucebaran2mo ago
awesome, thank you
Erisa
Erisa2mo ago
That's the best I can do Escalated
Walshy
Walshy2mo ago
Your Function is too large, not sure if you're adding a new dependency or if you were just close before hand but when adding that new page it's just going over the error message will be improved next week, sorry for the issue
lettucebaran
lettucebaran2mo ago
Thanks for replying, it was very helpful. I used @next/bundle-analyzer to analyze my build's size:
| Bundle | Stat | Parsed | gzippped |
| ----------- | ------- | ------ | -------- |
| client.html | 15.43mb | 1.63mb | 0.49mb |
| edge.html | 24.49mb | 3.29mb | 0.89mb |
| nodejs.html | 14.29mb | 1.20mb | 0.35mb |
| TOTAL SUM | 54.21mb | 6.12mb | 1.73mb |
| Bundle | Stat | Parsed | gzippped |
| ----------- | ------- | ------ | -------- |
| client.html | 15.43mb | 1.63mb | 0.49mb |
| edge.html | 24.49mb | 3.29mb | 0.89mb |
| nodejs.html | 14.29mb | 1.20mb | 0.35mb |
| TOTAL SUM | 54.21mb | 6.12mb | 1.73mb |
I am subscribed to the "Workers Paid" plan. I should have 10 MB after compressed with gzip (source: https://developers.cloudflare.com/workers/platform/limits/#worker-size). My gzip total is 1.73mb, so I am confused how I exceeded the max. function size limit.
Want results from more Discord servers?
Add your server