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
330 stars 57 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

sgreifeneder commented 2 years ago

same here

dedea82 commented 2 years ago

Hi, same problem here, starting today. Failed on different SWA deployments

procopenco commented 2 years ago

Same for me

EmmyHermans commented 2 years ago

Same issue for my project. In addition the Azure Functions in the deployed web app give a 503 error.

meinout67 commented 2 years ago

Raided prio A ticket to Azure

amitShimon1983 commented 2 years ago

Same Here please fix this

meinout67 commented 2 years ago

just got a call from Azure support. It is an outage in West Europe related to Static Web App and they are working on it right now to resolve it

sgreifeneder commented 2 years ago

seems to be still an issue?

meinout67 commented 2 years ago

Yes, no change since the issue started this afternoon. No update on the Azure support ticket either

eodeg commented 2 years ago

We have the same issue without any changes to the app. The functions are not running in the swa, and we are not able to deploy new versions.

mahmutsari commented 2 years ago

Same here.

niels-ws commented 2 years ago

same here :( Microsoft confirmed the issue in a ticket I opened and stated that they are working on a fix. This has been 10 hours ago.

niels-ws commented 2 years ago

Issue is solved for me, now. Deployments work again :)

sgreifeneder commented 2 years ago

I can also confirm it's working now ... but still took a long time for Microsoft to fix this.

amitShimon1983 commented 2 years ago

my app still crash can some one help me

niels-ws commented 2 years ago

my app still crash can some one help me

@amitShimon1983 you have to re-deploy your static web app. only than the functions are back and can be called from the app.

amitShimon1983 commented 2 years ago

Works fine thanks :)

my app still crash can some one help me

@amitShimon1983 you have to re-deploy your static web app. only than the functions are back and can be called from the app.

sedvardsen commented 2 years ago

It works here as well for all affected apps (after a redeploy). The custom roles source functionality is in preview and is no way mature enough to be used for critical applications yet.

We also have an outstanding issue regarding all users with "special" characters in their name. Being located in Scandinavia that affects a large portion of our user base. For these users an invalid JSON payload is sent to the role function, making it effectively useless. and that ticket has been sitting still the last 10 days.

We have developed a workaround for that, though it's a level of ugly that we'd rather not have as a permanent solution

pdaplyn commented 2 years ago

Confirmed that redeploy got things working again for me.

I assume it's not specific to my setup that the failed deployment caused the pre-existing functions to be dropped, resulting in all server-side calls failing with 503 errors?

I'm shocked that the deployment isn't a transactional process. This resulted in ~12 hrs downtime for my site.

mkarmark commented 2 years ago

Hi, yes I can confirm that this was due to a Azure Functions outage in West Europe. This issue has been resolved now, so let me know if things are still looking unhealthy! Sorry about the inconvenience caused during this outage!

miguelEsteban commented 2 years ago

Hi! I am currently getting the same error. In my case it is a net 6 function.

image
rasjakobsen commented 2 years ago

Hi!, I'm seeing exactly the same error as above - Using a Python based function using the managed function app, with SWA.

Region : West Europe

EmmyHermans commented 2 years ago

OUr azure functions where also not working again between 20:00 and 02:00 UTC yesterday. They are working again now.

bartpype commented 2 years ago

Yesterday we had the same problem with out static web app on Azure, same behaviour as on 31st of may. As @EmmyHermans mentioned in previous post, Azure site was down from around 20.00hrs till 02.00 UTC this morning. I created a support ticket in Azure, but no reaction so far from Microsoft.

@mkarmark, Can you see what happened in West Europe region? Two outages of 6 hours or longer in a short time (less than 2 weeks) is a serious outage in my opinion...

Because of the first outage on May 31st, we enabled AppInsights, but there is no record of any outage to be seen there. What is wrong with Azure lately?

bartpype commented 2 years ago

I just got an email from Microsoft as a response to my support ticket. They confirmed there was an outage in Western Europe again yesterday evening.

johnnyreilly commented 2 years ago

I'm seeing this also

jouz3 commented 2 years ago

Getting this too in Western Europe.

EDIT: Also failing for East US 2.

johnnyreilly commented 2 years ago

I have a call with Microsoft support 1030 tomorrow morning. Will share this issue in the call and report back on how it goes

jouz3 commented 2 years ago

I have a call with Microsoft support 1030 tomorrow morning. Will share this issue in the call and report back on how it goes

Any news? @johnnyreilly

johnnyreilly commented 2 years ago

Had call - they've said they'll get back to me next week. Unfortunately the person I spoke to needs to get assistance from others. Have supplied Bicep template and build logs from Azure DevOps task that does deployment

jouz3 commented 2 years ago

Got some help from @anthonychu. In my case the root of the problem was the setting "FUNCTIONS_WORKER_RUNTIME" in the Static Web App. After removing it and setting the correct platform\apiRuntime in the staticwebapp.config.json, the deployment works.

The Static Web App doesn't let me re-add the setting (like it's supposed to happen according to the docs), but it did before the first deployment. image

johnnyreilly commented 2 years ago

Oh this sounds really promising! Could you provide a few more details please?

In my case the root of the problem was the setting "FUNCTIONS_WORKER_RUNTIME" in the Static Web App.

Where were you setting this that was problematic and you changed?

The Static Web App doesn't let me re-add the setting (like it's supposed to happen according to the docs), but it did before the first deployment.

Don't quite understand this?

jouz3 commented 2 years ago

Where were you setting this that was problematic and you changed?

I had it in the Static Web App Application Settings.

johnnyreilly commented 2 years ago

Okay thanks - sounds like your situation is different from mine

johnnyreilly commented 2 years ago

Still waiting for support to get back to me - think I've covered everything I can from my end.

johnnyreilly commented 2 years ago

I've tried everything I can think of with Emad Khalifah of Microsoft Support. No success as yet - I've asked for the issue to be escalated. There is a related issue which speaks of EnvironmentId which appears to have been closed (surprising since I believe it is not fixed):

https://github.com/Azure/static-web-apps/issues/723

We've tried the workaround we list there out but it didn't work for us.

uxsoft commented 2 years ago

I have the same issue. The functions app deploys just fine when deploying directly to functions, but as fails as part of swa. Also, this worked before on the same project.

erwinsmit commented 2 years ago

I had the same problem too with a hybrid next.js app. For me it fixed setting build_timeout_in_minutes to a high value (e.g. 1000). This was just a lucky guess because the error did not state anything about a timeout issue.

abcdeepakr commented 1 year ago

I had the same problem too with a hybrid next.js app. For me it fixed setting build_timeout_in_minutes to a high value (e.g. 1000). This was just a lucky guess because the error did not state anything about a timeout issue.

hey, where do we have to add this setting, as I am facing this issue now. Azure Functions are not working suddenly, the functions fail to deploy.

abcdeepakr commented 1 year ago

Issue is solved for me, now. Deployments work again :)

did you have to do anything specific? or did MS fix it from their end?

ahzahri commented 1 year ago

We are facing the issue right now as well. The status page shows everything is fine Functions wise.

Does anybody have any info about this problem ?

Thank you.

fredrikatelevri commented 1 year ago

Same issues for us as well. No new deploys, everything worked well yesterday. Now the site is unavailable and it is not possible to deploy new code (Deployment Failure Reason: Failed to deploy the Azure Functions.). I tried setting up a completely new static web app but still the same issues. Should add to the context here that our app is a hybrid Next.JS app.

EmmyHermans commented 1 year ago

Same issue since this morning, but strangely only for our dev environment (we also have acceptance and production but those are still working). We've had this issue before and usually it's resolved without doing anything in a few hours. It's annoying that Azure pretends everything is fine though.

binkiesjoris commented 1 year ago

We are also running into this problem using the 'Deploy Azure Static Web App (Preview)' task. For another SWA application we are manually using an older version of the underlying container to manually deploy the app, but those deployments are working fine.

erwinsmit commented 1 year ago

We

I had the same problem too with a hybrid next.js app. For me it fixed setting build_timeout_in_minutes to a high value (e.g. 1000). This was just a lucky guess because the error did not state anything about a timeout issue.

hey, where do we have to add this setting, as I am facing this issue now. Azure Functions are not working suddenly, the functions fail to deploy.

You can add this value next to your other configuration values, see https://learn.microsoft.com/en-us/azure/static-web-apps/build-configuration?tabs=github-actions

We also experienced some downtime this morning. So I assume there must've been something going on at Azure's side.

arnoldboersma commented 1 year ago

Same issue here, we cannot deploy with the error message: 'Failure Reason: Failed to deploy the Azure Functions' and the site are currnetly unavalable as the function endpoints return 503 error messages.

Our apps are running in west europe.

Just after writing this comment the issue has been resolved, the sites are available and we can deploy succesfully.

EmmyHermans commented 1 year ago

Issue seems to have been resolved. App is available again for us also.

abcdeepakr commented 1 year ago

it has been resolved without doing anything, hope Microsoft could tell us something about it.

H-Ashrafi commented 1 year ago

I have the same issue for East Asia for a Hugo app running on Free Static Web plan, I wrote the function in C# and set the skip_api_build: true and copy pasted all the built files from the project into the api foler.

sedrak-digio commented 1 year ago

Hey all, I've been experiencing the same issue in East Asia for approximately the last 8hours, and it's still ongoing.

Azure functions hosted/deployed via Static Web App in the East Asia region. This occurs for any changes (even updating the readme). The Azure function can deploy if there's been no code change (i.e. with a text change commit/deploy, it'll fail, but if I create a new commit with the original text and deploy, it'll work, I assume it has something to do with caching/hashing of a previous successful deployment) though either way any new deployments fail consistently across multiple repos

To note: in the Azure portal > Static Web App > Application insights, the following error now shows up: Failed to fetch functions for your app. This seems to be now happening to all (3) of my Static Web Apps (East Asia)