Azure / Azure/static-web-apps

Deployment issue with swa cli : Forbidden issue

Open
#1,482 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Hi,
When I try to deploy a static web app content with the cli, I have an error during the deployment with this error message :
```
ℹ Try to validate location at: 'C:\xxx\wwwroot\staticwebapp.config.json'.
ℹ config_file_location: config file 'C:\xxx\wwwroot\staticwebapp.config.json' was found.
ℹ Looking for event info
ℹ Could not get event info. Proceeding
ℹ The content server has unexpectedly rejected the request with: Forbidden
ℹ Failed to record upload telemtry.
ℹ 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/

SUCCESS: There are no changes to provision for your application.
WARNING: your version of azd is out of date, you have 1.9.2 and the latest version is 1.9.3
```

Launched command :

`swa deploy ./output/wwwroot -T $Env:AZURE_TENANT_ID -S $Env:AZURE_SUBSCRIPTION_ID -R $Env:AZURE_RESOURCE_GROUP -n $Env:AZURE_STATIC_APP --env Production --verbose silly`

I don't know what is the issue and what is forbidden as deployment of the Azure Static WebApp service is done by IAC (bicep file), and for other environments everything works.

**Device info (if applicable):**
- OS: Windows 11
- Browser Edge
- Version 125.0.2535.67

I use the azd cli to provision azure services, and have different environments in many tenants, and on all other environments everything works.

I don't think that it's an RBAC issue on Azure as on all tenants I have the same rights (Contributor + Role base access administrator).

**Additional datas**

Here is the logs before deployment :

```
Deploying project to Azure Static Web Apps...
Fetching release metadata for version: stable. Please wait...
- version: stable
- buildId: 1.0.026911
- publishDate: 2024-05-15T19:23:23.3973684Z
- files:
- linux-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.026911/linux/StaticSitesClient
- sha: e1d9e033c973a35f64b7e41b6a114bd8e48022c9c3f7676e79047e87245a874d
- win-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.026911/windows/StaticSitesClient.exe
- sha: c67e5eed2b28fcf5c98348732653d1e2b37d842e6dde9a6b30322832c5d86fc7
- osx-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.026911/macOS/StaticSitesClient
- sha: 18ca42a1b13db9b8b6db6bd8c77e65def56fa7bf3ce3fb1184e890d8cd7dd033
Local client binary is up to date. Skipping download.
Deploying using C:\Users\xxx\.swa\deploy\1.0.026911\StaticSitesClient.exe@1.0.026911
Deploying using the following options:
- env:
- SWA_CLI_DEBUG: silly
- SWA_RUNTIME_WORKFLOW_LOCATION:
- SWA_RUNTIME_CONFIG_LOCATION: C:\xxx\wwwroot
- SWA_RUNTIME_CONFIG: C:\xxx\wwwroot\staticwebapp.config.json
- SWA_CLI_VERSION: 1.1.8
- SWA_CLI_DEPLOY_DRY_RUN: false
- SWA_CLI_DEPLOY_BINARY: C:\Users\xxx\.swa\deploy\1.0.026911\StaticSitesClient.exe@1.0.026911
- DEPLOYMENT_ACTION: upload
- DEPLOYMENT_PROVIDER: SwaCli
- REPOSITORY_BASE: C:\xxx
- SKIP_APP_BUILD: true
- SKIP_API_BUILD: true
- DEPLOYMENT_TOKEN:
- APP_LOCATION: C:\xxx\output\wwwroot
- API_LOCATION:
- DATA_API_LOCATION:
- CONFIG_FILE_LOCATION: C:\xxx\wwwroot
- VERBOSE: true
- FUNCTION_LANGUAGE: node
- FUNCTION_LANGUAGE_VERSION: 16
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.