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
318 stars 53 forks source link

'The Static Web App contents cannot be updated while a backend migration is in progress.' #1451

Closed rob-balfre closed 2 months ago

rob-balfre commented 2 months ago

When attempting to deploy via an Azure DevOps pipeline or the SWA cli we get the error:

The content server has rejected the request with: BadRequest
Reason: The Static Web App contents cannot be updated while a backend migration is in progress.

It was working fine for months until we added an API (Azure managed), first deployment worked and then all deployment since have failed with this error message.

iomariani commented 2 months ago

Same things happened here.

The content server has rejected the request with: BadRequest
Reason: The Static Web App contents cannot be updated while a backend migration is in progress.

Can't deploy anymore, even removing the SWA api folder completely...

Using Github Actions Azure/static-web-apps-deploy@v1

rob-balfre commented 2 months ago

We had to delete the app and start a fresh one!

On Tue, 16 Apr 2024, 11:52 am Marcos Mariani, @.***> wrote:

Same things happened here.

The content server has rejected the request with: BadRequest Reason: The Static Web App contents cannot be updated while a backend migration is in progress.

Can't deploy anymore, even removing the SWA api folder completely...

— Reply to this email directly, view it on GitHub https://github.com/Azure/static-web-apps/issues/1451#issuecomment-2058093772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUAM7SWIK7QXBCAPXW4QOTY5R76JAVCNFSM6AAAAABF3TTO5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYGA4TGNZXGI . You are receiving this because you authored the thread.Message ID: @.***>

g2o-patrickpoole commented 2 months ago

Same issue here. We have tried creating a new instance twice and each time we see this issue when attempting to deploy from SWA CLI after waiting a few minutes.

Tff27 commented 2 months ago

I'm facing the same issue deploying using a github action (Azure/static-web-apps-deploy@v1)

The content server has rejected the request with: BadRequest
Reason: The Static Web App contents cannot be updated while a backend migration is in progress.

Is there a way to see the backend migration progress?

marc-on-github commented 2 months ago

Same issue here

MPdeconcern commented 2 months ago

Same issue here. Help would be awesome

iomariani commented 2 months ago

We had to delete the app and start a fresh one!

This is what we had to do, and as precaution, detached the API deploy from the SWA action.

Tff27 commented 2 months ago

We had to delete the app and start a fresh one!

This is what we had to do, and as precaution, detached the API deploy from the SWA action.

I will do that as last resort but I would like to understatnd if this is a bug or if there is sometthing happening in the background

That backend migration error message is puzzling me.

bitsnorbytes commented 2 months ago

I have encountered the same issue. This is what i have done to fix it. It's a bit lengthy but does the job.

az staticwebapp delete--name <app_name> -g <resource_group>

az staticwebapp create --name <app_name> -g <resource_group>

az staticwebapp secrets list --name <app_name> --query "properties.apiKey"

 - name: Install Azure SWA CLI
   run: npm install -g @azure/static-web-apps-cli

 - name: Deploy 
   run: |
      swa deploy <app_location> \
      --api-location <api_location> \
      --env <env> \
      --deployment-token <deployment_token> \ 
      -name <name_of_the_app>

Note: You can use the the official github action - Azure/static-web-apps-deploy@ to do deployment too but i haven't tested it. So, cannot confirm if it will work. I prefer this way.

serena-shen2 commented 2 months ago

@rob-balfre @Tff27 @iomariani @bitsnorbytes @MPdeconcern @marc-on-github @g2o-patrickpoole If your site is still experiencing this issue would be able to provide the site’s default host name or site name so we can look into this issue.

mkarmark commented 2 months ago

We have identified the issue and are working on a mitigation strategy. I apologize for any inconvenience that this may have caused.

Tff27 commented 2 months ago

@rob-balfre @Tff27 @iomariani @bitsnorbytes @MPdeconcern @marc-on-github @g2o-patrickpoole If your site is still experiencing this issue would be able to provide the site’s default host name or site name so we can look into this issue.

I imagine with the issue already being uncovered you don't need this anymore Let me know if this is still required

serena-shen2 commented 2 months ago

@rob-balfre @Tff27 @iomariani @bitsnorbytes @MPdeconcern @marc-on-github @g2o-patrickpoole If your site is still experiencing this issue would be able to provide the site’s default host name or site name so we can look into this issue.

I imagine with the issue already being uncovered you don't need this anymore Let me know if this is still required

No it's not required anymore, thanks for checking in.

Tff27 commented 2 months ago

We have identified the issue and are working on a mitigation strategy. I apologize for any inconvenience that this may have caused.

It's working just fine now 🚀

lgastler commented 2 months ago

Seems to be working again for us too 👍🏼