Share via

Deployment Timeout Issue with New Azure Static Web App

Iyngaran Iyathurai 5 Reputation points
2025-05-21T07:37:37.2266667+00:00

Hello,

I'm experiencing an issue while deploying a new Azure Static Web App built with ReactJS. During the deployment process, after the "Finished Upload" step, it enters the "Polling on deployment" phase and continues to display the following repeatedly:

Status: InProgress. Time: 0.30718(s)

...

Status: InProgress. Time: 585.301984(s)

Eventually, it ends with an "Upload Timed Out" message, and I'm unsure if the deployment was successful or not. The application does not appear to be live.

For context, I have several other static web apps deployed in the same environment that are working fine. This issue is only occurring with this newly created app.

Could you please help me identify what’s going wrong or guide me on how to resolve this?

Thank you,

Iyngaran

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.


4 answers

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 7,420 Reputation points Microsoft External Staff Moderator
    2025-05-21T14:52:43.31+00:00

    Hi @Iyngaran Iyathurai
    Thanks for your Update.
    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer.

    Issue :Deployment Timeout Issue with New Azure Static Web App

    solution:
    I resolved the issue.

    Although it's a ReactJS app, the package.json file had a next dependency. I believe it was added when we installed next-themes.

    I removed the following two lines from package.json.

    "next": "14.0.3",
    "next-themes": "^0.4.6",
    

    That resolved the issue, and the deployment was successful. 😊
    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

  2. Iyngaran Iyathurai 5 Reputation points
    2025-05-21T12:54:33.71+00:00

    Hi Prabhavathi Manchala

    Thank you for your response.

    I see, here that that build has been completed successfully, Here is the output.

    ♻️ Generating routes...

    ✅ Processed routes in 517ms

    vite v6.3.5 building for production...

    transforming...

    ✓ 4485 modules transformed.

    computing gzip size...

    dist/index.html 0.47 kB │ gzip: 0.31 kB



    dist/assets/index-GNZGV_oQ.js 1,076.96 kB │ gzip: 316.48 kB

    ✓ built in 20.88s

    Preparing output...

    Copying files to destination directory '/7f420773-2625-4b33-ad49-6732ac308247-swa-oryx/app'...

    Done in 6 sec(s).

    Removing existing manifest file

    Creating a manifest file...

    Manifest file created.

    Copying .ostype to manifest output directory.

    Done in 57 sec(s).

    ---End of Oryx build logs---

    Try to validate location at: '/734......-oryx/app/dist'.

    Finished building app with Oryx

    Using 'staticwebapp.config.json' file for configuration information, 'routes.json' will be ignored.

    [WARNING] For Next.js apps, staticwebapp.config.json features are not fully supported yet!

    Repackaged Next.js app to deploy on the backend.

    Starting to build function app with Oryx

    ---Oryx build logs---

    Also, I don't see the View Workflow Logs in the mentioned location.

    Thanks

    Iyngaran

    1 person found this answer helpful.

  3. David Broggy 6,801 Reputation points MVP
    2025-07-26T14:26:49.77+00:00

    I've had this exact issue. seemed to be taking forever to deploy.

    But there's a very specific and very old bug that could be your issue like for me.

    See my notes below.

    ● Azure Static Web Apps Deployment Best Practices

    Quick One-Command Deployment

    Based on resolving common SWA CLI deployment issues, here's a reliable deployment approach:

    1. Create Deployment Script (deploy-to-azure.sh)

    #!/bin/bash

    Copy files to public folder structure

    mkdir -p public

    cp *.html *.js *.css *.json public/

    Deploy directly to production with correct flags

    swa deploy --app-location public --env production --deployment-token $DEPLOYMENT_TOKEN --verbose

    1. Key flags that solved my issues
    • --app-location public - Critical for proper file structure
    • --env production - Deploy directly to production, avoiding preview issues
    • --verbose - Shows detailed deployment progress
    1. Common Issues & Solutions

    Problem: Deployment gets stuck or files don't update

    Solution: Use --app-location public flag and ensure files are in /public folder

    Problem: SWA CLI hangs during deployment

    Solution: Deploy directly to production with --env production

    1. Helpful Resources
    • GitHub Issue that solved my problems:

    https://github.com/Azure/static-web-apps-cli/issues/591#issuecomment-1283494661

    1. Complete Working Example

    Install SWA CLI

    npm install -g @azure/static-web-apps-cli

    Get deployment token

    DEPLOYMENT_TOKEN=$(az staticwebapp secrets list --name YOUR_APP_NAME --resource-group YOUR_RG --query

    "properties.apiKey" --output tsv)

    Deploy with correct structure

    mkdir -p public

    cp index.html script.js styles.css public/

    swa deploy --app-location public --env production --deployment-token $DEPLOYMENT_TOKEN --verbose

    This approach consistently works around the common SWA CLI deployment stuck issues many developers encounter.

    0 comments No comments

  4. Iyngaran Iyathurai 5 Reputation points
    2025-05-21T14:24:24.4933333+00:00

    I resolved the issue.

    Although it's a ReactJS app, the package.json file had a next dependency. I believe it was added when we installed next-themes.

    I removed the following two lines from package.json.

    "next": "14.0.3",
    "next-themes": "^0.4.6",
    

    That resolved the issue, and the deployment was successful. 😊


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.