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.

Linux Consumption Function app sync trigger fails with RBAC auth when WEBSITE_RUN_FROM_PACKAGE is already added with new URL

See original GitHub issue

Hello,

When we try to deploy our node function we are getting following error:

Run Azure/functions-action@v1.4.6
Using RBAC for authentication, GitHub Action will perform resource validation.
Successfully acquired site configs from function app!
Detected function app sku: Consumption
Successfully acquired app settings from function app (RBAC)!
Detected function app language: Node
Will archive . into /home/runner/work/_temp/temp_web_package_***.zip as function app content
Will use WEBSITE_RUN_FROM_PACKAGE to deploy since RBAC is detected and your function app is on Linux Consumption.
Error: Execution Exception (state: PublishContent) (step: Invocation)
Error:   When request Azure resource at PublishContent, Sync Trigger Functionapp : Failed to perform sync trigger on function app. Function app may have malformed content. Please manually restart your function app and inspect the package from WEBSITE_RUN_FROM_PACKAGE.
Error: Deployment Failed!

When I check the WEBSITE_RUN_FROM_PACKAGE Parameter in Azure Portal, I see that the parameter is updated. Removing WEBSITE_RUN_FROM_PACKAGE from function and redeploying works.

Technical details:

  • node function
  • linux
  • RBAC Deployment
  • consumption plan

Any Idea, what could be wrong?

Cheers

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
patelchandnicommented, Sep 19, 2022

Go to azure portal and remove function app setting “WEBSITE_RUN_FROM_PACKAGE”. Once it is successful, then re-deploy using publish profile instead of RBAC like here: https://github.com/Azure/actions-workflow-samples/blob/a9e4bce81a6c87e56021a480805a521403437eaf/FunctionApp/linux-python-functionapp-on-azure.yml#L46

WEBSITE_RUN_FROM_PACKAGE = 1 is not supported on Linux consumption because of which the other option is WEBSITE_RUN_FROM_PACKAGE = URL if the user wants to use a remote zip.

Using ZipDeploy path is the recommended path for Linux Consumption, and it doesn’t increase cold start.

1reaction
Cuahchiccommented, Sep 13, 2022

Please try to deploy using publish profile instead of RBAC like here: https://github.com/Azure/actions-workflow-samples/blob/a9e4bce81a6c87e56021a480805a521403437eaf/FunctionApp/linux-python-functionapp-on-azure.yml#L46

According to my previous attempts using publish profiles, they are not compatible with WEBSITE_RUN_FROM_PACKAGE values being set, and these are necessary for package deployments. They must be set to a URL for a Linux consumption plan project according to this documentation: https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#enable-functions-to-run-from-a-package

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to sync triggers for function app . Error: BadRequest ...
This is a linux function app I am trying to deploy with consumption plan. - task: AzureFunctionApp@1 displayName: "Deploy function app ...
Read more >
Failed to sync triggers for function app - Error: Unauthorized
Hi,. I am having the error below when deploying an Azure Function App: 2021-11-16T16:54:27.5205915Z ##[debug]Deployment Failed with Error: ...
Read more >
Azure App Services and Function App
Solution: Azure functions (function app) is the container of function like http trigger, timer, blob trigger etc.
Read more >
Deploy to Azure Directly From the Repository with GitHub ...
You hear about that new GitHub Actions. Or maybe you didn't but would like to add a continuous integration, continuous deployment (CI-CD) to...
Read more >
Function Trigger Syncing - Ken Muse
If you're using WEBSITE_RUN_FROM_PACKAGE with an external URL, deploying a new package requires updating an App Setting. This causes the ...
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