Next.js Discord

Discord Forum

404 Blank Page (Tries to fetch old main and app js chunks)

Unanswered
Scale parasitoid posted this in #help-forum
Open in Discord
Scale parasitoidOP
I have an application deployed in aws amplify after successfull deploy when i open my browser tab which has my site already loaded it gives blank page. Because in the console it is trying to access old app and main js files which are now not present. What can be done ?

15 Replies

Scale parasitoidOP
i have my website open in one tab, I deploy my application and after lets say 10 mins i go to the tab that has my site open then in console it tries to access old app.js and main.js file. If i hard refresh it then only page works.
After the page is inactive for certain time it tries to relaod the page and during that reload it tries to fetch old chunks hence 404.
Scale parasitoidOP
yes cloudfare.
during deployment we are invalidating the cache as well.
Yup, with my builds also, a similar things happen. The page displays a blank page for a few mins after new deployment.
Try using development mode in cloudflare first and see if it works
Scale parasitoidOP
ok.
Or after every build, maybe purge cloudflare cache
Scale parasitoidOP
sorry i am using cloud front.
Scale parasitoidOP
I tried invlaidating the cache but no luck. I am using cloudfront.
Scale parasitoidOP
@Anay-208 anything i can do ?
@Scale parasitoid <@755810867878297610> anything i can do ?
The problem is that, I can’t debug this. Try stackoverflow