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.

Deployment fails from time to time as the actions fails to find the function App

See original GitHub issue

Hi, I am deploying a dotnet-isolated function app using .NET 6 and from time to time the deployment fails with the following error

Using RBAC for authentication, GitHub Action will perform resource validation.
##[debug]try-get AzureCLIAuthorizer
##[debug]"/usr/bin/az" account show
##[debug]"/usr/bin/az" cloud show
##[debug]"/usr/bin/az" account get-access-token
::add-mask::***
##[debug][GET] https://management.azure.com/subscriptions/***/resources?$filter=resourceType EQ 'Microsoft.Web%2FSites' AND name EQ '___FUNCTION__NAME___'&api-version=2016-07-01
Error: Execution Exception (state: ValidateAzureResource) (step: Invocation)
Error:   Resource ___FUNCTION__NAME___ doesn't exist.
Error:     Error: Resource ___FUNCTION__NAME___ doesn't exist.
    at Function.<anonymous> (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility.js:21:23)
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Deployment Failed!
##[debug]Node Action run completed with exit code 1

I am using RBAC authentication via azure/login@v1. The service principal has contributor permission on the whole subscription. When I use Re-run all jobs for the workflow run, then deployment usually works fine.

I am deploying the function app via terraform, before deployment runs. But it also fails, if the function app is already there and exists for hours. So doesn’t seem to be some kind of “race condition”.

As I deploy IaC via terraform using publish-profiles would be overly complicated I would say. There seems to be no native support in terraform’s azurerm to get the profile.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:21

github_iconTop GitHub Comments

1reaction
KernelPryaniccommented, Dec 21, 2022

Wow, no movement since February, really?

1reaction
Joaolfeliciocommented, Mar 12, 2022

Had the same issue, deleting the functions and re-running the pipeline did it, not the best solution in any case…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github action to deploy to Azure Function app cannot find app ...
Hello, I'm getting this (below) error when I run the github workflow to publish an azure function. I have added the AzureWebJobsStorage to ......
Read more >
Unable to deploy fresh Azure Function to Linux app
I've tried using the azure cli, VS Code, and Github Actions, but it keeps failing. When I deploy the same function to a...
Read more >
Troubleshoot deployment issues in Lambda
General: Cannot find, cannot load, unable to import, class not found, no such file or directory. Error: Cannot find module 'function'. Error: cannot...
Read more >
Azure Function APP Deployment error - Visual Studio Feedback
Please check if you have this issue when you deploy Azure Function APP locally without Azure DevOps. And here is a similar ticket:...
Read more >
Troubleshooting failed or hanging tasks - Octopus Deploy
If a deployment failed unexpectedly within a built-in step, you may have misconfigured the step. Double check the configuration of your step in ......
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