Azure Static Web Apps CLI upload failed and the QA environment is still stuck in Uploading

Antono Celester 0 Reputation points
2026-11-16T12:08:43.8966667+00:00

We deploy a prebuilt frontend from Windows using Azure Static Web Apps CLI 2.1.0. The affected resource is a Standard-tier QA Static Web App. Azure calls its default environment Production, but the site is used for QA.

On November 14, 2026 at about 10:54 UTC, the CLI deployment failed. Azure's environment record changed to Uploading at that time and still showed that status with the same last-update timestamp when checked on November 16. A subsequent check matched all 212 public assets from the previous build. The candidate build never matched the files being served.

What we checked:

  • Azure Activity Log shows a successful deployment credential lookup just before the upload. It shows no matching deployment failure entry, and the environment record has no build log URL. The original CLI output was suppressed by our runner, so we don't have the exact client-side error.
  • In the portal, Diagnose and solve problems > Content Deployment returned a generic error for both the one-hour window covering the attempt and the 24-hour window after refreshing the page.
  • The candidate ZIP passed integrity checks, contains index.html and the same staticwebapp.config.json as the last working build, and has 213 files totaling about 7.5 MB uncompressed.

What is the supported way to investigate or recover a Static Web Apps deployment stuck in Uploading when Content Deployment diagnostics also fail? We'd like to preserve the currently served build and avoid deleting or recreating the site. The separate QA API and database are off and can stay off while we investigate the static upload.

Azure Static Web Apps
Azure Static Web Apps

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


1 answer

Sort by: Newest
  1. AI answer

    2026-11-16T12:14:33.3266667+00:00

    There is no documented self-service operation to clear one Static Web Apps deployment stuck in Uploading; preserve the working site and open an Azure technical support request for the resource’s deployment/content-distribution state to be investigated and reset.

    Open the support request

    1. In the affected Static Web App, select Support + Troubleshooting under Help.
    2. If the suggested diagnostics do not resolve it, select Create a support request.
    3. Choose:
      • Issue type: Technical
      • Service: Azure Static Web Apps
      • Problem area: Deployment/content deployment, or the closest available option
    4. Enable advanced diagnostic information if organizational policy permits it. Azure documents the portal workflow and notes that technical cases require a support plan. Creating the request requires subscription-level Owner, Contributor, Support Request Contributor, or equivalent Microsoft.Support/* permission.^1^

    Include this evidence:

    • Static Web App resource ID, region, Standard SKU, and default hostname.
    • Environment: default/Production, although it is operationally used as QA.
    • Failure time: 2026-11-14 10:54 UTC.
    • Environment status: Uploading, with its unchanged last-update timestamp.
    • SWA CLI version: 2.1.0, Windows, and runner details.
    • Exact command structure, with all tokens and credentials removed.
    • Activity Log event and its correlation ID for the credential lookup.
    • Statement that Content Deployment diagnostics failed for both tested windows.
    • Statement that the previous 212-file build remains live and the 213-file candidate never became visible.
    • ZIP size, file count, and the completed integrity/configuration checks.
    • Request: clear or repair the stuck deployment record/content-distribution workflow without deleting the Static Web App or currently served production content.

    A closely matching open Static Web Apps issue reports the same combination: an environment indefinitely in Uploading, successful authentication/configuration resolution, and the previous frontend continuing to serve.^2^

    Collect safe CLI evidence without uploading again

    The SWA CLI supports --verbose, --print-config, and deployment dry-run output.^3^ Run this from PowerShell against the extracted candidate folder:

    swa deploy "C:\path\to\candidate" `
      --env production `
      --dry-run `
      --print-config `
      --verbose silly *>&1 |
      Tee-Object ".\swa-dry-run-20261116.log"
    

    Before attaching the log, redact deployment tokens, tenant/subscription identifiers if required by policy, local usernames, and other credentials. The dry run is useful for recording the resolved application, output folder, environment, and CLI configuration, but it does not exercise the failed server-side upload path.

    Also capture the environment record without modifying it:

    az staticwebapp environment list `
      --name "<app-name>" `
      --resource-group "<resource-group>" `
      --output json > ".\swa-environments-20261116.json"
    

    The Azure CLI documents this command as listing all environments, including production.^4^

    The missing deployment failure in Activity Log does not rule out an upload/content-processing failure. Activity Log primarily records Azure Resource Manager control-plane operations, while service data operations are separate.^5^

    Avoid destructive recovery actions

    Do not run az staticwebapp environment delete against the default environment. The documented command can delete the production environment itself; it is not a command for clearing one stuck deployment.^4^

    Likewise, do not reset the deployment token merely because the Activity Log lacks the upload failure: the credential lookup succeeded, and the available evidence does not establish a token problem.

    Only if Support requests a reproduction

    A real retry can activate its artifact if it succeeds. To preserve the currently served build, reproduce with the known-good 212-file artifact, not the candidate, and capture unsuppressed output:

    $env:SWA_CLI_DEPLOYMENT_TOKEN = "<token-from-secure-store>"
    swa deploy "C:\path\to\known-good-build" `
      --env production `
      --verbose silly *>&1 |
      Tee-Object ".\swa-reproduction.log"
    

    Target production explicitly because swa deploy otherwise defaults to preview. For a frontend-only deployment, deploy the built static-content folder and omit --api-location; the API and database do not need to be started.^6^


    References

    1. Create an Azure support request
    2. Production environment stuck in UPLOADING - GitHub
    3. Azure Static Web Apps CLI reference
    4. az staticwebapp environment delete
    5. Activity log in Azure Monitor
    6. Deploy a static web app with Azure Static Web Apps CLI
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.