Random deployment errors with InternalServerError
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
We use Azure Static Web Apps to host our application, and use the GitHub Action `Azure/static-web-apps-deploy@v1`. After a few weeks of use, we noticed that the Github Action fails randomly with the error
```
The content server has rejected the request with: InternalServerError
Reason: An unexpected error has occurred. Please try again later.
```
Our usage is pretty basic, and here is our GitHub Action `.yml` file:
``` yaml
name: Deploy docs
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
build_and_deploy_job:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v4
with:
submodules: true
lfs: false
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun run build-docs
- name: Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BRAVE_DESERT_023CB6603 }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
skip_app_build: true
skip_api_build: true
app_location: "storybook-static" # This is where the build-docs command places the output
###### End of Repository/Build Configurations ######
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_BRAVE_DESERT_023CB6603 }}
action: "close"
```
When we run the Github Action, it fails on the "Deploy" step with this output:
```
Run Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ***
repo_token: ***
action: upload
skip_app_build: true
skip_api_build: true
app_location: storybook-static
/usr/bin/docker run --name d4e11109b5339e488eacd0865f518[2](https://github.com/xyz/designsystem/actions/runs/12122373946/job/33803650524#step:7:2)3b30_2e5b05 --label 5674d4 --workdir /github/workspace --rm -e "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN" -e "INPUT_REPO_TOKEN" -e "INPUT_ACTION" -e "INPUT_SKIP_APP_BUILD" -e "INPUT_SKIP_API_BUILD" -e "INPUT_APP_LOCATION" -e "INPUT_API_BUILD_COMMAND" -e "INPUT_API_LOCATION" -e "INPUT_APP_ARTIFACT_LOCATION" -e "INPUT_OUTPUT_LOCATION" -e "INPUT_APP_BUILD_COMMAND" -e "INPUT_ROUTES_LOCATION" -e "INPUT_CONFIG_FILE_LOCATION" -e "INPUT_PRODUCTION_BRANCH" -e "INPUT_DEPLOYMENT_ENVIRONMENT" -e "INPUT_IS_STATIC_EXPORT" -e "INPUT_DATA_API_LOCATION" -e "INPUT_GITHUB_ID_TOKEN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_RE
DeploymentId: 28106094-5574-4cd[3](https://github.com/xyz/designsystem/actions/runs/12122373946/job/33803650524#step:7:3)-9065-d899105aeac6
Try to validate location at: '/github/workspace/storybook-static'.
App Directory Location: 'storybook-static' was found.
Try to validate location at: '/github/workspace/swa-db-connections'.
Looking for event info
Skipping step to build /github/workspace/storybook-static with Oryx
No Api directory specified. Azure Functions will not be created.
Either no Api directory was specified, or the specified directory was not found. Azure Functions will not be created.
The content server has rejected the request with: InternalServerError
Reason: An unexpected error has occurred. Please try again later.
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/
Exiting
```
We created our Azure Static Web app through the wizard in the Azure GUI, so the `.yml` is mostly from that initial setup. We have renamed the `.yml` file to `deploy-docs.yml` instead of the initial file name that came from the setup in the Azure GUI, however I doubt that it has something to do with the random deployment errors.
It is also worth mentioning that the errors seems to occur mosly on preview deployments (when creating a PR). We haven't experienced any errors when deploying to prod, however we've only deployed to prod a few times this far.
It occurs so often that we find Azure Static Web Apps to be barely usable at this point. Can anyone assist me in this manner and sort out why these random deployment errors occurs?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.