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

Azure Pipelines: Upload Timed Out. Unsure if deployment was successful or not. #1084

Open johnnyreilly opened 1 year ago

johnnyreilly commented 1 year ago

Describe the bug

Sometimes (and it is sporadic) the Azure Pipelines Static Web App task fails with the AzureStaticWebApp@0 task

Zipping App Artifacts
App Zip will be created from directory: /e118baeb-8efb-4c9d-bd5e-6accf74a822a-swa-oryx/app/dist
Done Zipping App Artifacts
Uploading build artifacts.
Finished Upload. Polling on deployment.
Status: InProgress. Time: 0.0298873(s)
Status: InProgress. Time: 15.0635654(s)
Status: InProgress. Time: 30.7737882(s)
Status: InProgress. Time: 47.7504889(s)
Status: InProgress. Time: 62.8368332(s)
Status: InProgress. Time: 78.0058851(s)
Status: InProgress. Time: 93.0384401(s)
Status: InProgress. Time: 108.0590791(s)
Status: InProgress. Time: 123.0946637(s)
Status: InProgress. Time: 138.1139904(s)
Status: InProgress. Time: 153.1378509(s)
Status: InProgress. Time: 168.1816969(s)
Status: InProgress. Time: 183.2083963(s)
Status: InProgress. Time: 198.2601224(s)
Status: InProgress. Time: 213.2859497(s)
Status: InProgress. Time: 228.3098524(s)
Upload Timed Out. Unsure if deployment was successful or not.

For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
Exiting
##[error]Error: The process '/usr/bin/bash' failed with exit code 1

To Reproduce Steps to reproduce the behavior:

Run a deployment that deploys the static web app in Azure Pipelines using the AzureStaticWebApp@0 task

Expected behavior

No deployment failure

Screenshots

image

Additional context Add any other context about the problem here.

hugoforte commented 7 months ago

I'm having the same issue

marvijo-code commented 5 months ago

Hi. More information would allow more accurate assistance. Generally, this happens if you didn't create a production build (npm run build), then set the app location to the output folder (e.g., dist). The timeout usually happens when you attempt to deploy your root/source folder

cidthecoatrack commented 3 weeks ago

I also have this issue and can provide some additional context:

I successfully deployed the app the first time via an ADO Pipeline. Unlike Johnny, I pulled my site from an artifact store and published that, instead of building within the AzureStaticWebApp@0 step. Just app, no API. image

With no other changes, the next time I went to deploy, it timed out as @johnnyreilly noted (effectively same screenshot). Here is my configuration, which again, worked for the first time, but fails on the second: image

Azure reports the website's status as 'Failed', but won't provide any further details, so I can't determine what exactly the error is. image

Despite the job saying it uploaded everything, the website itself shows the old code, so my assumption is that either the upload didn't actually happen or something else failed and Azure rolled back the files.

cidthecoatrack commented 3 weeks ago

Update: A later deployment did succeed, so this issue seems random/intermittent