question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to fetch Kudu App Settings. Internal Server Error (CODE: 500)

See original GitHub issue

Type: Bug

Enter Task Name: Azure/functions-action@v1

Environment

  • Server - Github actions

Issue Description

My app was working for months and I recently tried to update it and got this error.

I have searched the 'net high and low and have found similar errors, but nothing that matches this. None of the suggestions in those Issues/SO posts have helped. Examples:

https://stackoverflow.com/questions/64873031/azure-functions-deploy-from-github-actions-results-in-error-failed-to-fetch-ku

https://docs.microsoft.com/en-us/answers/questions/137869/publish-profile-publishurl-needs-to-be-adjusted-af.html

Here’s my Action log:

Run Azure/functions-action@v1
  with:
    app-name: porscheoptioncodes
    slot-name: production
    package: Api/output
    publish-profile: ***
    respect-pom-xml: false
    respect-funcignore: false
    scm-do-build-during-deployment: false
    enable-oryx-build: false
  env:
    AZURE_FUNCTIONAPP_PACKAGE_PATH: Api
    DOTNET_VERSION: 3.1.301
    DOTNET_ROOT: C:\Users\runneradmin\AppData\Local\Microsoft\dotnet
Successfully parsed SCM credential from old publish-profile format.
Using SCM credential for authentication, GitHub Action will not perform resource validation.
Error: Execution Exception (state: ValidateAzureResource) (step: Invocation)
Error:   When request Azure resource at ValidateAzureResource, Get Function App Settings : Failed to acquire app settings from https://<scmsite>/api/settings with publish-profile
Error:     Failed to fetch Kudu App Settings.
Internal Server Error (CODE: 500)
Error:       Error: Failed to fetch Kudu App Settings.
Internal Server Error (CODE: 500)
    at Kudu.<anonymous> (D:\a\_actions\Azure\functions-action\v1\node_modules\azure-actions-appservice-rest\Kudu\azure-app-kudu-service.js:62:23)
    at Generator.next (<anonymous>)
    at fulfilled (D:\a\_actions\Azure\functions-action\v1\node_modules\azure-actions-appservice-rest\Kudu\azure-app-kudu-service.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Deployment Failed!

My yaml:

    - name: 'Run Azure Functions Action'
      uses: Azure/functions-action@v1
      id: fa
      with:
        app-name: 'porscheoptioncodes'
        slot-name: 'production'
        package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
        publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_xxx}}

My PublishSettings file which is stored in:

<publishData>
    <publishProfile profileName="PorscheOptionCodes - Web Deploy" 
       publishMethod="MSDeploy" 
       publishUrl="porscheoptioncodes.scm.azurewebsites.net:443" 
       msdeploySite="PorscheOptionCodes" 
       userName="$PorscheOptionCodes" 
       userPWD="<pwd>" 
       destinationAppUrl="http://porscheoptioncodes.azurewebsites.net" 
       SQLServerDBConnectionString="" 
       mySQLDBConnectionString="" 
       hostingProviderForumLink="" 
       controlPanelLink="http://windows.azure.com" 
       webSystem="WebSites">
       <databases />
    </publishProfile>
...
</publishData>

I went to the Azure Portal/Deployment Center and did Disconnect and reconnected, having it re-generate the workflow file.

image

After doing this, I found I had to change 'AZURE_FUNCTIONAPP_PACKAGE_PATHfrom.toApi` (because that’s what my client for this function expects).

So now my .yml is:

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy dotnet core app to Azure Function App - PorscheOptionCodes

on:
  push:
    branches:
      - master
  workflow_dispatch:

env:
  AZURE_FUNCTIONAPP_PACKAGE_PATH: 'Api' # set this to the path to your web app project, defaults to the repository root
  DOTNET_VERSION: '3.1.301'  # set this to the dotnet version to use

jobs:
  build-and-deploy:
    runs-on: windows-latest
    steps:
    - name: 'Checkout GitHub Action'
      uses: actions/checkout@v2

    - name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: ${{ env.DOTNET_VERSION }}

    - name: 'Resolve Project Dependencies Using Dotnet'
      shell: pwsh
      run: |
        pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
        dotnet build --configuration Release --output ./output
        popd

    - name: 'Run Azure Functions Action'
      uses: Azure/functions-action@v1
      id: fa
      with:
        app-name: 'PorscheOptionCodes'
        slot-name: 'production'
        package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
        publish-profile: ${{ secrets.AzureAppService_PublishProfile_xyz }}
  

The same error occurs.

I’m at my wits end. As I note this was working for months (last working commit was last September). Something changed between then on the Azure side that broke this, I believe.

Happy to be proven wrong, but I don’t know how to dive deeper to figure it out.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
brenoalvscommented, Oct 15, 2021

Same here, my deploy workflow was working 6 days ago and now it’s broken. I did not change anything on the workflow file or Azure

This is the error I’m seeing. Screen Shot 2021-10-15 at 5 37 07 PM

1reaction
PMillsArchcommented, Aug 27, 2021

Eventually tracked out problem down to a mixture of the blob storage account not having table permission and not being public endpoint. If we have to swap to private endpoint, we’ll have to get a private build agent.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure release pipeline error: Failed to fetch Kudu App Settings ...
This problem is often caused by application level issues, such as:1.requests taking a long time 2.application using high memory/CPU 3.
Read more >
Failed to fetch Kudu App Settings. Internal Server Error (CODE ...
Type: Bug. Enter Task Name: Azure/functions-action@v1. Environment. Server - Github actions. Issue Description. My app was working for ...
Read more >
Azure DevOps release fails - Failed to fetch Kudu App Settings
The new release is throwing an error in the "Deploy Azure App Service" step that says "Error: Failed to fetch Kudu App Settings....
Read more >
Azure DevOps release pipeline getting fail with "Failed to fetch ...
I am using Azure ADO Pipeline to build and push Docker Image to ACR from my code in build pipeline and release pipeline...
Read more >
Addressing 500 Server Error on Web App - Akumina Community
Sites hosted in an Azure Web App may experience 500 (5XX) errors (this is not ... adding the following key under “Application Settings”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found