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
324 stars 56 forks source link

Deployment Failure Reason: Failed to deploy the Azure Functions #819

Open sedvardsen opened 2 years ago

sedvardsen commented 2 years ago

Exact same issue as described in https://github.com/Azure/static-web-apps/issues/622

Tested on two different deployments on two different static web apps, one of deployments was green 4 days ago, on re-deploy it now fails with "Failed to deploy the Azure Functions"

image

H-Ashrafi commented 1 year ago

@sedrak-digio in my case the issue was in two auto generated environment variables, #1022

sedrak-digio commented 1 year ago

@sedrak-digio in my case, the issue was in two auto generated environment variables, #1022

Thanks for the reply, @H-Ashrafi, no code change has been able to fix it so far. I've cloned my static web app into a different region as well for now, US West, with better success at deploying (8/10 last deploys), but still unexpected failures from time to time, though still nowhere near as bad as trying to deploy in East Asia passed 1/80 in the last 12 hours. A very disappointing outcome from one of the major cloud providers :(

The app itself isn't too large, a simple static React app with only three endpoints to deploy

Update: the last five deployments in East Asia have successfully passed

CalvinQuark commented 1 year ago

I've encountered this issue while attempting to follow the Build an Azure Static Web Apps website with Blazor and serverless API tutorial.

TravisKool commented 1 year ago

Using Azure SWA with single function, I am experiencing this issue now for the last 15 hours.

I tried to redeploy old artifacts that previously succeeded and it failed.

Please help me find a solution

brappleye commented 1 year ago

I just encountered this when experimenting with a basic SWA and adding a simple, single function to deploy as part of it. Hoping there is a solution.

QuarkRobot commented 1 year ago

Same here.

TravisKool commented 1 year ago

Bump.

Still down 25 hours later and unable to deploy to SWA with the error described in this post. Please provide a solution, thank you

TravisKool commented 1 year ago

Is anyone looking into this or have an update?

QuarkRobot commented 1 year ago

Is anyone looking into this or have an update?

Yep, I've submitted a support ticket. Same issue for me since about noon yesterday (AESDT).

TravisKool commented 1 year ago

Awesome, thanks so much!! Please share if there is a solution or an update, :)

TravisKool commented 1 year ago

Still experiencing this issue and can't deploy to Azure...

hugoforte commented 1 year ago

I'm having this issue as well. My branch can deploy to one of my two environments. Tried older successful deployments and they also do not work.

QuarkRobot commented 1 year ago

Azure support has only replied once to my ticket with I've investigated and found that the error seems to be happening more on the side of artifact itself and asked for the artifacts but I've no idea how to get them for SWA.

TravisKool commented 1 year ago

Thanks for sharing QuarkRobot. I am not sure either, if it was a normal app service, you can use Kudu, but SWA doesn't seem to have this available.

If it was artifacts it wouldn't explain why nobody can redeploy previously successful deploys...

hugoforte commented 1 year ago

My deployment started working again - was down for 6 days... would love to get a root cause analysis.

QuarkRobot commented 1 year ago

Me too, looks like it all magically fixed itself.

TravisKool commented 1 year ago

Mine is fixed too.

I didn't even check the last deploy at 8 PM 2/5 because I got so used to it not working but it was green!

Would really like to see some accountability here from Microsoft with some explanation of the failure...

brappleye commented 1 year ago

Yep, we're working again as of yesterday too. I agree, some kind of explanation would give us some better confidence around this solution. As we evaluate Azure for this particular type of application setup/deployment, it would help us to reinforce a decision around it. We have built out similar applications in AWS and they have been more tedious to configure, but always very reliable.

hugoforte commented 1 year ago

@QuarkRobot Are you able to update your ticket and ask for a root cause analysis per chance?

QuarkRobot commented 1 year ago

@hugoforte I did this yesterday. Here is the reposnse.

After looking into this with a few of my resources I was made aware that the product group team has this issue raised and it is working right now to find an RCA for this issue.

hohenp commented 1 year ago

Having the same issue since today. When we deploy our site we get the same error within the pipeline. Are there any news regarding that issue?

chribjel commented 1 year ago

We also get this issue on both our sites. We use the Next.js Hybrid preview. When we go to the resource it only says: "The service is unavailable."

matyas-f commented 1 year ago

Same, and one failed deployment in the pipeline completely shuts down the site. Does anyone have a suggestion how to roll back easily to a working version?

Looking at this thread, this problem makes the Azure Static Web App a very unstable candidate to deploy Next.js Hybrid Apps (or any other kind of static apps with serverless API routes).

FlorianRappl commented 1 year ago

Same here. Everything was working fine until yesterday, then had somebody notifying us that part of the application returns a service unavailable...

All Azure Functions in the SWA are gone in the Azure Portal - a re-deployment brings the classic "Failed to deploy the Azure Functions".

image

chribjel commented 1 year ago

Same, and one failed deployment in the pipeline completely shuts down the site. Does anyone have a suggestion how to roll back easily to a working version?

Looking at this thread, this problem makes the Azure Static Web App a very unstable candidate to deploy Next.js Hybrid Apps (or any other kind of static apps with serverless API routes).

We are currently not using any API-routes in our Nextjs hybrid app. Do you know of any way of making it past the deployment error?

FlorianRappl commented 1 year ago

No - the error seems to be in the Azure infrastructure (and thus the API that is used by the Azure Functions / SWA CLI fails here). As mentioned, previously published functions just disappeared literally over night.

erwinsmit commented 1 year ago

Same here too, interesting, not all my Azure Hybrid Nextjs SWA are down.

felicksLindgren commented 1 year ago

Got this issue currently as well image

StaticVoidDigital commented 1 year ago

same issue here. can't redeploy, getting "Deployment Failed". App is currently responding either Backend call failure or Service Unavailable

johnnyreilly commented 1 year ago

Possibly related to this, we're failing to deploy Azure Functions as well; details here: https://github.com/Azure/static-web-apps/issues/1089#issuecomment-1460036013

BrandowBuenos commented 1 year ago

Same problem here.

niels-ws commented 1 year ago

same here :( again

artlepool commented 1 year ago

same with us too. i'm currently on a private twitter chat with Azure Support and have provided them with the relevant errors, screenshots, etc

FlorianRappl commented 1 year ago

It's quite astonishing that this (critical) issue - which presumably is now 12+ hours old - is neither resolved yet, nor is there a public statement that I'm aware of.

bm-fez commented 1 year ago

Seeing the same issue trying to deploy to a preview environment via the boilerplate GitHub Actions workflow.

hohenp commented 1 year ago

It's quite astonishing that this (critical) issue - which presumably is now 12+ hours old - is neither resolved yet, nor is there a public statement that I'm aware of.

Absolutly. There was a small update here: https://github.com/Azure/static-web-apps/issues/1097#issuecomment-1460112834

artlepool commented 1 year ago

it has now be escalated to a formal issue: RV37-PZ0, which you can see on the Service Health blade in the portal

niels-ws commented 1 year ago

the issue is fixed for me :) I was able to redeploy the static web app and now it works again

FlorianRappl commented 1 year ago

Issue is fixed for me. Redeployed - works.

bm-fez commented 1 year ago

Seeing the same issue trying to deploy to a preview environment via the boilerplate GitHub Actions workflow.

Seems to be fixed for us too

johnnyreilly commented 1 year ago

Working for me

SophisticatedConsulting commented 1 year ago

Not working for me still.

The ASWA deploys but the function fails:

Function Runtime Information. OS: windows, Functions Runtime: ~4, dotnet version: 6.0 Finished building function app with Oryx Zipping Api Artifacts Done Zipping Api Artifacts Zipping App Artifacts Done Zipping App Artifacts Uploading build artifacts. Finished Upload. Polling on deployment. Status: InProgress. Time: 0.1665003(s) Status: InProgress. Time: 15.3716279(s) Status: Failed. Time: 30.6060929(s) Deployment Failed :(

Deployment Failure Reason: Failed to deploy the Azure Functions.

aduggleby commented 1 year ago

Was working for a week, now it's producing the same error for me again. Anyone else?

joostmeijles commented 1 year ago

Was working for a week, now it's producing the same error for me again. Anyone else?

Same issue here.

deBarrosS commented 1 year ago

I can confirm it worked fine for roughly a week but now it crashes again.

dylanbudgen commented 1 year ago

Same issue here. Also, hello there @johnnyreilly :)

johnnyreilly commented 1 year ago

Fancy seeing you here @dylanbudgen !

ltwlf commented 1 year ago

Same issue here :(

fabge commented 1 year ago

same here :weary:

can-makeithappen commented 1 year ago

Same here

Edit:

Deploying the app in static mode (next export and is_static_export: true) works. Error occurs just as a hybrid app.

This error did not occur a few days ago on the exact same project & commit.