Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
331 stars 57 forks source link

SWA not serving all deployed files #1563

Open Skintkingle opened 1 month ago

Skintkingle commented 1 month ago

SWA hosting is causing files to 404. If we try and redeploy the same commit that we deployed successfully on a previous date, then the build appears to be successful, but browsing to our SWA seems to cause random files to not be deployed, resulting in 404s and page load issues. We are deploying a Blazor app using the AzureStaticWebApp@0 task. at version 0.247.1. This version is UNCHANGED and so is not the tasks fault.

Without any way to browse the SWAs content from the portal. I'm unable to verify if these files actually exist. They have always existed before and we've not changed anything so my assumption is the SWA is at fault, not our files/deployment.

Initially raised here

To Reproduce deploy using AzureStaticWebApp@0 to a SWA site in Azure. Attempt to browse to the site after deployment From dev tools, notice random 404s on files

Expected behavior A fully working deployment of our SWA

Screenshots

Image

Device info (if applicable):

hunglng commented 1 month ago

I also struggled a whole day for this, I am also using Balzor WASM and SWA in preview environment. Tried to delete slot and recreate with the same name will cause 404 for whole site. After 1-2 hours, the site will up and run again without any changes. It looks like CDN issue but I used Free plan and don't have CDN setup

Skintkingle commented 1 month ago

FWIW We're also on the free plan. And we are deploying to a non-production environment. (an env called UAT)

jonavask commented 1 month ago

We're also experiencing the same problem - causing 404's on our named environments with certain files. We're using the standard plan with Enterprise-grade edge however seeing this across all environments regardless of plan.

This is a highly critical issue!

valeriiavask commented 1 month ago

worth mentioning that some files ARE available, while other files are NOT also, the files that are not available, if you refresh many times, in some occasions you could get the file back (as if it's being load balanced, and you don't always get the same result)

patlamontagne commented 1 month ago

The problem seems to be resolved today. Anyone else can confirm?

Skintkingle commented 1 month ago

I can confirm I'm not seeing the same issue today. We left the SWA totally alone so something cloud-side must have changed to fix it.

hunglng commented 1 month ago

I don't encounter this issue today but still afraid if it can happend again, because I don't know the reason or any workaround for this.

ui-jb commented 4 days ago

We've been experiencing an issue like this right after deployment on our hybrid Next.js (app router) site. The issues either go away after a few minutes or go away after clicking on a few links. Image