Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
330 stars 56 forks source link

The content server has rejected the request with: InternalServerError #780

Open zhuniqiabedin opened 2 years ago

zhuniqiabedin commented 2 years ago

Hi there,

Always the build an Angular project on Azure Static Apps worked through GitHub, but today GitHub Actions returned error that stopped the project to go further. Till yesterday it worked perfectly fine.

The repo I used to deploy is private but I have this script at build. "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "proxy": "http://localhost:5000" },

The related GitHub Actions workflow configuration is here

name: Azure Static Web Apps CI/CD

on:
  push:
    branches:
      - master
  pull_request:
    types: [opened, synchronize, reopened, closed]
    branches:
      - master

jobs:
  build_and_deploy_job:
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
    runs-on: ubuntu-latest
    name: Build and Deploy Job
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: Build And Deploy
        id: builddeploy
        uses: Azure/static-web-apps-deploy@v0.0.1-preview
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_CALM_SKY_0C2C5AE03 }}
          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
          app_location: "/" # App source code path
          api_location: "api" # Api source code path - optional
          output_location: "dist/smart-career-ng" # Built app content directory - optional
          ###### 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@v0.0.1-preview
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_CALM_SKY_0C2C5AE03 }}
          action: "close"
Screenshot 2022-04-06 at 23 06 16
zhuniqiabedin commented 2 years ago

I was able to fix it, I just revert the last PR and then deployed and it is working for new PRs now.

miwebst commented 2 years ago

Hmm this is unexpected, what was the difference between the 2 PR's? What changed?

zhuniqiabedin commented 2 years ago

Hmm this is unexpected, what was the difference between the 2 PR's? What changed?

Some new APIs that I have written and some changes on Services.

Zache commented 2 years ago

I have gotten this for different pipelines and it looks like some transient error, because the actual deployed artifacts should not have changed.