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.

Bug: Failed Successful Deployment - Error Handling AzureFunctionAppV1

See original GitHub issue

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: AzureFunctionAppV1

Environment

Azure Pipelines

  • Account: lostgolfballs
  • Project Name: www.lostgolfballs.com
  • BuildId: releaseId=1101

Issue Description

Upon running a AzureFunction Task with a zip file, I anticipate that I update an existing function app with the new package files.

Instead, I get a blue screen that looks like: Screen Shot 2019-09-26 at 3 48 16 PM

If I re-run the release, I get my function loading successfully after the task completes.

Task logs

Got service connection details for Azure App Service:'MY_SERVICE'
2019-09-26T19:38:57.8311929Z Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_PACKAGE":"1"}
2019-09-26T19:38:57.8312354Z Deleting App Service Application settings. Data: ["WEBSITE_RUN_FROM_ZIP"]
2019-09-26T19:39:01.7703054Z Package deployment using ZIP Deploy initiated.
2019-09-26T19:39:22.8310452Z Successfully deployed web package to App Service.
2019-09-26T19:39:28.6247890Z Successfully updated App Service configuration details
2019-09-26T19:39:28.9075674Z App Service Application URL: MY_SERVICE_URL

Other Information:

When it successfully fails, the resulting app content looks like:

Screen Shot 2019-09-26 at 3 54 50 PM

Contents of Web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name = "Site Unavailable" stopProcessing = "true">
                    <match url = ".*" />
                    <action type = "CustomResponse" statusCode = "503" subStatusCode = "0" statusReason = "Site Unavailable" statusDescription = "Could not download zip" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

Contents of FAILED TO INITIALIZE RUN FROM PACKAGE.txt:

Run From Package Initialization failed.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:33 (9 by maintainers)

github_iconTop GitHub Comments

9reactions
damienwebdevcommented, Sep 26, 2019

Turns out, the bug is due to the task running as Zip Deploy but still setting WEBSITE_RUN_FROM_PACKAGE=1.

If I manually remove the WEBSITE_RUN_FROM_PACKAGE this is fixed.

5reactions
HansOlavScommented, Feb 10, 2020

@damienwebdev I experienced the exact same issue today. I’ve been stuck for 4 hours trying to figure out why a newly created Azure Functions app wouldn’t get deployed correctly. After setting the runtime to ~2 (the newly created app has ~3 as default) then zipdeploy started working for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug: Failed Successful Deployment - Error Handling ...
Entering this information will route you directly to the right team and expedite traction. Question, Bug, or Feature? Type: Bug. Enter Task Name ......
Read more >
Bug in Function App naming causing deployment error on the ...
Create Function app with 60 char name: allows deploy but deployment fails with 400 error:"There was a conflict. The remote server returned an ......
Read more >
Controlling Deployments using Release Gates
Pre-deployment gates ensures there are no active issues in the work item or problem management system before deploying a build to an ...
Read more >
Failed To Initialize Run From Package.Txt - ADocLib
Write, build, and deploy a service to Cloud Run; Use Error Reporting and ... Bug: Failed Successful Deployment - Error Handling AzureFunctionAppV1 #11444....
Read more >
Azure App Service Deploy Retry Failure
When the tasks fail with this message, we can see that there were 3 retries. ... Error: C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe failed...
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