Azure / Azure/static-web-apps

Failed to contact content server, stopping...

Open
#1,245 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Deployment of a static web app using an Azure DevOps Release Pipeline is failing with error:
```
DeploymentId: 46602efe-c8e2-4ea8-a640-35b5c7faac90

Verbose logging enabled
Try to validate location at: '/working_dir/...'.
Build timeout not specified, defaulting to 15 minutes
App Directory Location: '...' was found.
Try to validate location at: '/working_dir/swa-db-connections'.
Try to validate location at: '.../staticwebapp.config.json'.
config_file_location: config file '.../staticwebapp.config.json' was found.
Looking for event info
Could not get event info. Proceeding
##[error]Failed to contact content server, stopping...
##[error]An unknown exception has occurred
##[error]Failed to record upload telemtry.

##[warning]For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
##[warning]If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/
##[warning]Exiting
##[error]Error: The process '/usr/bin/bash' failed with exit code 1
##[section]Finishing: Deploy Static Web App
```

We are using a self-hosted agent on a Azure Virtual Machine Scaleset (VMSS) with Ubuntu 20.04 LTS and docker installed.

Deployment target is a static web app with a private endpoint. The VMSS instance has access to the VNET containing the static web app.

The error occurs constantly since 21/07/2023.

**Release Pipeline YAML:**
```
steps:
- task: AzureStaticWebApp@0
displayName: 'Deploy Static Web App'
inputs:
app_location: /...
config_file_location: ...
skip_app_build: true
skip_api_build: false
is_static_export: false
verbose: true
azure_static_web_apps_api_token: '$(static_webapp_deployment_token)'

```
**staticwebapp.config.json:**
```
{
"navigationFallback": {
"rewrite": "/index.html",
"exclude": ["*.{css,scss,js,png,gif,ico,jpg,svg}"]
},
"globalHeaders": {
"Strict-Transport-Security": "max-age=63072000; includeSubdomains; preload",
"X-Frame-Options": "sameorigin",
"X-Content-Type-Options": "nosniff",
"Referrer-Policy": "same-origin"
},
"routes": [
{
"route": "*.html",
"headers": {
"Cache-Control": "no-store"
}
}
]
}
```

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.