"This deployment failed" with no further information - why did my deployment fail?
I am using Workers & Pages. Deployments have stopped working. When I run
wrangler pages deploy
, it finishes with "Deployment complete!", but when I visit the deployment in the dashboard, a tooltip shows "This deployment failed". I have hunted EVERYWHERE in the UI for any further information, but where is it? How do I debug "This deployment failed"?
My deployment id: 2aef1fb7-032a-40c9-8a72-571a801d952e8 Replies
I found this very similar post: https://discord.com/channels/595317990191398933/1180146475691425822/1180146475691425822
@JohnDotAwesome over there you said "I'm not sure why wrangler isn't telling you an error, but the error is your Functions/script is too large for Workers".
Could that be the case for me? How would I know? How do I debug?
It's a bug specific to using wrangler to upload. If the deployment fails with function issues, it just dies like that.
https://github.com/cloudflare/workers-sdk/issues/3966
There's no way for you to get the failure reason. Are you using Functions? If so I would check if you're over the 1 MB (free) or 10 MB (paid)
GitHub
🐛 BUG: wrangler logs success for pages deploy even with Functions f...
Which Cloudflare product(s) does this pertain to? Wrangler core What version(s) of the tool(s) are you using? 3.8.0 What version of Node are you using? 18.17.1 What operating system are you using? ...
Aha, ok, thanks @Chaika. I wasn't aware of that limit, and I see I have a function of 2146.58 KiB
This has been an interesting experiment but I think I'll move back to a traditional Fly deployment. Lots of sharp edges on this Pages/Functions stuff!
Github Integration is generally a better experience and tells you of those errors. But yea, there are certain limitations like that. Workers & Pages Function Scripts you want to exist everywhere for no/low cold start times. For it to exist everywhere you need pretty strict size limitations
GitHub integrationyou mean https://github.com/cloudflare/wrangler-action ? Haven't tried it but I would guess it uses wrangler under the hood so would have the same bug?
GitHub
GitHub - cloudflare/wrangler-action: 🧙♀️ easily deploy cloudflare ...
🧙♀️ easily deploy cloudflare workers applications using wrangler and github actions - GitHub - cloudflare/wrangler-action: 🧙♀️ easily deploy cloudflare workers applications using wrangler and git...
No, when you create a new pages application you can pick "Connect to Git" and hook up your Github repo directly: https://developers.cloudflare.com/pages/get-started/guide/#select-your-github-repository
Cloudflare Docs
Get started guide · Cloudflare Pages docs
In this guide, you will get started with Cloudflare Pages, and deploy your first website to the Pages platform.
Then for every commit (configurable) Pages has its own CI/CD it runs for you (500 builds month for free, 30 minute time limit iirc), and you can specify what commands it uses, etc, to build your project.
Oh interesting, I hadn't seen that! I'd probably be using it if I knew of it
Though now I know what the problem is, and it seems fairly fundamental, I think it's time for me to move off Workers - thinking my app is not best suited for it