An Azure service that provides streamlined full-stack web app development.
Hi@Reginaldo Sales | Contabilidade Contsales ,
Good diagnosis on your end. This exact error ("Request is missing the pull request id" with Production stuck on "Uploading") is a known open issue with token-based swa deploytracked here since 2024:
https://github.com/Azure/static-web-apps/issues/1435. It happens when the deployment doesn't get associated with the production environment on the backend, so the content server falls back to expecting a preview/PR deployment, which requires a pull request ID.
Things to check, in order of likelihood:
- Confirm the token is actually being passed. On Windows,
$tokenis PowerShell syntax and won't expand in cmd. If the token arrives empty or malformed, the backend can't resolve the environment and throws exactly this error, which would explain why it reproduces identically across both resources. Test by printing it, or set it explicitly:
$env:SWA_CLI_DEPLOYMENT_TOKEN="<paste-token-directly>"
swa deploy ./ --env production
- Reset the deployment token in the portal (SWA resource > Overview > Manage deployment token > Reset) and use the new one if the current token is stale or tied to a mismatched resource.
- Make sure you're on the latest CLI:
npm install -g @azure/static-web-apps-cli@latestThen retry. - Try deploying from inside the content folder without the flag, since
swa deploytargets production by default:
cd <folder-with-index.html>
swa deploy
If the token is confirmed valid and correctly passed and it still fails on two independent resources, then it's reasonable to treat it as a backend issue. Since you already have the Deployment IDs captured, raise it on the issue thread above or open an Azure support ticket with those IDs and resource names so the team can trace the rejected requests server-side.
Reference: https://learn.microsoft.com/en-us/azure/static-web-apps/static-web-apps-cli-deploy