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

Deployment Failure Reason: Web app warm up timed out. Please try again later. #1488

Open usapath-mitren opened 3 weeks ago

usapath-mitren commented 3 weeks ago

Unable to release changes to our production environment. Our deploy step through GitHub actions fails with Deployment Failure Reason: Web app warm up timed out. Please try again later..

Try to validate location at: '/bin/staticsites/ce4c467b-7d6a-4867-a7ae-2baf524cf661-swa-oryx/app/.next'.
Oryx has determined that the app build artifacts are in the '.next' directory. If this is incorrect please specify the app artifact location.
Finished building app with Oryx
Detected standalone folder, so using it for deployment.
Repackaged Next.js app to deploy on the backend.
Skipping step to build /bin/staticsites/ce4c467b-7d6a-4867-a7ae-2baf524cf661-swa-oryx/app/.next/standalone with Oryx
Web App Runtime Information. OS: linux, node version: 18
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.0948356(s)
Status: InProgress. Time: 15.1814266(s)
Status: InProgress. Time: 30.2918825(s)
Status: InProgress. Time: 45.388645(s)
Status: InProgress. Time: 60.5228289(s)
Status: InProgress. Time: 75.8092439(s)
Status: InProgress. Time: 90.8957401(s)
Status: InProgress. Time: 105.985561(s)
Status: InProgress. Time: 121.1094838(s)
Status: InProgress. Time: 136.2002482(s)
Status: InProgress. Time: 151.2910812(s)
Status: InProgress. Time: 166.3980658(s)
Status: InProgress. Time: 181.546266(s)
Status: InProgress. Time: 196.6329748(s)
Status: InProgress. Time: 211.7504871(s)
Status: InProgress. Time: 226.8421452(s)
Status: InProgress. Time: 241.9326554(s)
Status: InProgress. Time: 257.0389893(s)
Status: InProgress. Time: 274.0792257(s)
Status: InProgress. Time: 289.1696806(s)
Status: InProgress. Time: 304.4143481(s)
Status: InProgress. Time: 319.5070442(s)
Status: InProgress. Time: 334.5990826(s)
Status: InProgress. Time: 349.708962(s)
Status: InProgress. Time: 364.7979753(s)
Status: InProgress. Time: 379.8828368(s)
Status: InProgress. Time: 395.0170282(s)
Status: InProgress. Time: 410.1034864(s)
Status: InProgress. Time: 425.19[610](https://github.com/usapath/website/actions/runs/9361223426/job/25769189616#step:6:611)21(s)
Status: InProgress. Time: 440.3022672(s)
Status: InProgress. Time: 455.3886888(s)
Status: InProgress. Time: 470.4802132(s)
Status: InProgress. Time: 485.59004(s)
Status: InProgress. Time: 500.6779079(s)
Status: InProgress. Time: 515.7713605(s)
Status: InProgress. Time: 530.8758086(s)
Status: InProgress. Time: 545.9738871(s)
Status: InProgress. Time: 561.060216(s)
Status: InProgress. Time: 578.3088628(s)
Status: Failed. Time: 593.400541(s)
Deployment Failed :(
Deployment Failure Reason: Web app warm up timed out. Please try again later.

Expected behavior We've never seen this issue before, the deploy should just work as expected.

Screenshots If applicable, add screenshots to help explain your problem.

Device info (if applicable):

Additional context Add any other context about the problem here.

cj-clifton commented 2 weeks ago

Same here

bladerunner0001 commented 2 weeks ago

Same for me

TimKerre commented 2 weeks ago

Same here, did not have any issues for about 2 weeks but now it is back and happens on almost every deployment, extremely annoying.

joechoi-git commented 2 weeks ago

I had the same issue, but once I updated the Next build to build the app with the standalone mode, the deployment started working for me.

Here are the steps that you can do.

next.config.js

const nextConfig = {
    output: "standalone"
};

package.json

    "scripts": {
        "build": "next build && cp -r .next/static .next/standalone/.next/ && cp -r public .next/standalone/"
    }

azure-pipeline.yml

                app_location: "/" # App source code path
                api_location: "" # Api source code path - optional
                output_location: "" # Built app content directory - optional
                app_build_command: "npm run build"
                api_build_command: "rm -rf ./node_modules/@next/swc-* && rm -rf ./.next/cache"