Cloudflare Caching old versions after build - even after purge

We have an Angular app running on Google Cloud. Up until a few days ago each time we deployed a new build after a hard refresh the new version was stable immediately.

Now when we deploy, Cloudflare is retaining old javascript runtime files in the cache and so even after a hard refresh their is a mismatch and so the site shows blank.

I have tried:

Purging the cache in Cloudflare
Clearing the cache in browser
Hard reloads

It seems to be intermittent making me think it is serving some instances of the new build and some of the old??

A little stuck on what to try next…

Did you check your Cloudflare Pages dashboard and made sure that the new build did run successfully?

We don’t use Cloudflare Pages but the build is showing as successful in Google Cloud Build History.

Sorry, I misunderstood something.
Can you provide us with the domain and a specific URL please so we can check it on our end?

I could but the issue is it only affects the internal pages of the app and to access those you’d need a user account.

It seems to be stable again now.

Could this just be slower than usual propergation of the build across the CDN maybe?

Files don’t propagate at Cloudflare like they do at Push CDNs. But the command to flush could have taken a little longer to propagate. But since I dont have any info, nor evidence for this I can’t say that this was the case.

Glad to hear it’s stable now.

It seems to happen when we do a new build so I could replicate it and get you a user account set up if it happens again. Would you be open to that?

In this community we do not ask/request any access to any application. So that’s something we normally don’t do.

But feel free to provide screenshots to explain things and I will try to assist you.
Something that shows what you do and what you would expect, then what the actual situation is.

Thanks.

Great - I will take a loom video next time this happens and show you the page source as the runtime js files were being served from the cache wrongly after the build. Be easier to show you what I mean.

Thansk, that would be great. Please include/show the headers, of the “wrong cache” aswell, since this would give some insights about what is causing that and helps to debug it.