500 error when deploying via Azure Pipelines
Hi there,
I'm suddenly getting a 500 status error back when I try to deploy my Azure Function using Azure DevOps build agent. There's not much error logging so I am not sure what to go on.
Below is the error:
Starting: AzureFunctionApp
Task : Azure Functions Deploy Description : Update a function app with .NET, Python, JavaScript, PowerShell, Java based web applications Version : 2.223.1 Author : Microsoft Corporation Help : https://aka.ms/azurefunctiontroubleshooting
##[warning]Resource file has already set to: /home/vsts/work/_tasks/AzureFunctionApp_501dd25d-1785-43e4-b4e5-a5c78ccc0573/2.223.1/node_modules/azure-pipelines-tasks-azure-arm-rest-v2/module.json Got service connection details for Azure App Service:'lb-d-fa-bg' Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"} Deleting App Service Application settings. Data: ["WEBSITE_RUN_FROM_ZIP"] App Service Application settings are already present. Validating deployment package for functions app before Zip Deploy Package deployment using ZIP Deploy initiated. ##[error]Failed to deploy web package to App Service. ##[warning]Can't find loc string for key: KuduStackTraceURL ##[error]KuduStackTraceURL https://$lb-d-fa-bg:***@lb-d-fa-bg.scm.azurewebsites.net/api/vfs/LogFiles/kudu/trace ##[error]Error: Error: Failed to deploy web package to App Service. Internal Server Error (CODE: 500) Successfully added release annotation to the Application Insight : lb-d-fa-bg-ai App Service Application URL: http://lb-d-fa-bg.azurewebsites.net/ Finishing: AzureFunctionApp
And this is an excerpt from my Azure Pipeline yaml file:
stages:
-
stage: Build displayName: Build stage jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
-
task: NodeTool@0 inputs: versionSpec: "14.x" displayName: "Install Node.js"
-
script: | if [ -f extensions.csproj ] then dotnet build extensions.csproj --runtime ubuntu.16.04-x64 --output ./bin fi displayName: "Build extensions"
-
script: | npm install npm run build --if-present displayName: "Prepare binaries"
-
task: ArchiveFiles@2 displayName: "Archive files" inputs: rootFolderOrFile: "$(System.DefaultWorkingDirectory)" includeRootFolder: false archiveType: zip archiveFile: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip replaceExistingArchive: true
-
upload: $(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip artifact: drop
-
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
-
stage: Deploy_to_dev displayName: Deploy to dev jobs:
- deployment: ApprovalGate displayName: Deploy to dev environment: lb-d-fa-bg strategy: runOnce: deploy: steps: - task: AzureFunctionApp@2 inputs: azureSubscription: "lb-d-rg-sc" appType: "functionApp" appName: "lb-d-fa-bg" package: "$(Pipeline.Workspace)/drop/$(Build.BuildId).zip"
Does anyone know what I should go on from this?
Issue occurred due to storage issues. Would be nice if that would be clear from the error message.