Cloudflare Pages "Failed due to an internal error"

I am getting the same thing.

It seems to happen on the 2nd build.

Also, it doesn’t matter whether its gatsby or hugo.

Both failed.

It is failing on the git clone.

There is no other log, so I have no idea what is causing it.

Are y’all getting this in the log?

10:46:39.976	Initializing build environment. This may take up to a few minutes to complete
10:47:19.816	Success: Finished initializing build environment
10:47:19.816	Cloning repository...
10:47:26.683	Failed: an internal error occurred
1 Like

No, both @MidAutumnMoon and I are getting the same “Failed: an internal error occurred” message later in the process: after the clone and build have completed, during the final “Deploying to Cloudflare’s global network” stage.

Nothing got solved or improved after several days, at least for my account. Maybe we need @MoreHelp :frowning:

You might also try the Discord forum where the Workers devs hang out:

Post the link to this thread so they can read it through.

Thanks a lot! I can’t find the Discord invite link anywhere.

It’s in his post… :slight_smile:

1 Like

I mean, I can’t find the invite link anywhere on Cloudflare’s site or forum before that post. Sorry for my imprecise expression as I’m not a native English speaker.

2 Likes

You certainly had me fooled. You do better than many native English speakers. So you probably meant that you couldn’t find the link. And now you’ve earned a heaping load of sympathy from native-Italian-speaking @matteo.

1 Like

Oh, I always make small mistakes like this one, since there are no such grammars in my language. I do hope I could sense English better in the future. Thanks for such a pleasant chat!

2 Likes

I have a ticket open regarding this (#2130197), one of my pages seems to have a very high chance of “internal error”, I personally suspect its due to the amount of files in my repository (4000), it usually fails at 20 minutes on the “Deploying to Cloudflare’s global network” step.

The documents currently state a 20000 file limit, and with no asset being larger than 25MB

The strange thing is, if I keep on trying to redeploy, it will eventually work, with the final step taking about 16 minutes. So my suggestion would be to double check you’re within the limits, and then just keep re-deploying until it works

But yes, I think there should be a better error message

There is a known bug that is being worked on by the Pages team that will cause this error. I don’t know if this applies to your situation.

It is caused by enabling web analytics, then disabling it.

The workaround is to re-enable web analytics, or to delete site and re-add.

3 Likes

Sadly I’m pretty sure this known bug is not the cause of my error. I haven’t used or enabled Cloudflare Web analytics.

I also have an open ticket regarding this issue (#2138696), I will keep this thread updated if I learn anything from the support ticket.

1 Like

I have successfully deployed my site, and I have a hypothesis as to what was going wrong.

Roughly once per day for the last week, I have been logging into Cloudflare Pages, pulling up the failed build, and clicking “Retry Deployment”. Each time I did so, it failed at the same point:

But today it gave me a different error, this time during the “Building application” step:

|01:23:57.022|Finished|
|---|---|
|01:23:57.022|Validating asset output directory|
|01:23:57.023|Error: Asset /opt/buildhome/repo/_site/dl/largefile.xlsx is over the 25MB limit. Size: 25410095 bytes|

That file wasn’t new, it had always been in the repository. But previously, Cloudflare Pages just silently omitted it from the website, as I described in this previous Cloudflare Community post: Cloudflare Pages Git LFS: File Size Limit? - #2 by michael94

My working hypothesis is that excessively large files changed from a soft failure (file exclusion) into a hard failure (build crash) during the last week. But the error message was completely vague until a new check was added within the last 24 hours. I have no internal knowledge of what’s happening inside Cloudflare to confirm whether my hypothesis is true. But that’s what happened for me.

Now that I’ve deleted the large file from my repository, I have successfully deployed the latest version of my website.

The Cloudflare Pages surely need more polishing in the future. Actually, I’m just migrating my site back to Workers Site as it’s more feature rich and stable than Pages currently.

I heard back from Cloudflare Support: they say the issue is resolved, but didn’t provide any information about what the issue was or how it was resolved.

Hi there,

We appreciate your patience regarding this case.

Our Engineering team has notified us that this issue should now be resolved.

Can you please confirm on your end and let us know if you need further assistance?

Kind regards,

Blas
Technical Support Engineer | Cloudflare
Search the Cloudflare Community for advice and insight.

I encouraged the support team to weigh in on this thread so that we have clarity about what was going wrong, what was fixed, and whether any action is required on our parts to avoid this issue in the future.

@blas is probably still online and might know what was fixed. Keep in mind that it could be some super secret back-end coding they had to fix and can’t share the details.

Hi @michael94,

Just replied to your support ticket.

TL;DR
The behaviour you observed may have been the result of the asset optimization and compression feature that was recently disabled due to additional issues reported by other users.

A fix is in the works, and I can notify you once we get more feedback from our internal team.

Cheers,

3 Likes

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

Fix for this should be in production now. Thank you for your patience!

5 Likes