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.

ZipDeploy to Web App via Github Actions fails without any error details

See original GitHub issue

Hi,

I’m setting up a new deploy pipeline with Github Actions. The action was initially created from Azure via the Deployment Center for the web app in question.

The project that gets build is a classic ASP.NET Framework (4.5.1) application. The web-app that I’m trying to deploy to has been around for many years (if that matters).

I have tried to run the deploy script both when the web-app is started and when it is stopped (to exclude locking issues).

The Github action is defined as follows:

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

name: Build and deploy ASP app to Azure Web App - <webapp-name>(<webapp-slot-name>)

on:
  push:
    branches:
      - <branch-name>
  workflow_dispatch:

jobs:
  build:
    runs-on: 'windows-latest'

    steps:
    - uses: actions/checkout@v2

    - name: Setup MSBuild path
      uses: microsoft/setup-msbuild@v1.0.2

    - name: Setup NuGet
      uses: NuGet/setup-nuget@v1.0.5

    - name: Restore NuGet packages
      run: nuget restore .\<path-to-solution>\<solution-name>.sln

    - name: Publish to folder
      run: msbuild .\<path-to-project>\<project-name>.csproj /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:Configuration="Release" /p:_PackageTempDir="\published\"

    - name: Upload artifact for deployment job
      uses: actions/upload-artifact@v2
      with:
        name: ASP-app
        path: '/published/**'

  deploy:
    runs-on: 'windows-latest'
    needs: build
    environment:
      name: '<webapp-slot-name>'
      url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

    steps:
    - name: Download artifact from build job
      uses: actions/download-artifact@v2
      with:
        name: ASP-app

    - name: Deploy to Azure Web App
      id: deploy-to-webapp
      uses: azure/webapps-deploy@v2
      with:
        app-name: '<webapp-name>'
        slot-name: '<webapp-slot-name>'
        publish-profile: ${{ secrets.AzureAppService_PublishProfile_<publish-profile-id> }}
        package: .

So, the source gets built, and the zip is uploaded to local/Temp and is extracted. But then it just stops and I get the following error message:

Cleaning up temp folders from previous zip deployments and extracting pushed zip file D:\local\Temp\zipdeploy\<file-id>.zip (16.98 MB) to D:\local\Temp\zipdeploy\extracted
Error: Failed to deploy web package to App Service.
Error: Deployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details.

I can see that the zip has been extracted into D:\local\Temp\zipdeploy\extracted. So my guess is that something happens after that. I have enabled detailed logging but it does not give any further information about what goes wrong.

As I said, this web app has been around for many years. And there has been multiple deploy-methods. For example, I don’t know if deploy.cmd is invoked in this process. If it is, there might be some mismatch there.

Grateful for any advice about how to diagnose the error and get the deploy working.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:21 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rtomlinii-landryscommented, Oct 4, 2021

What is this status of this bug? When I try to deploy a file of .zip type, I get an error saying this file isn’t supported. I can add images if need be.

0reactions
kumaraksh1commented, Dec 22, 2022

@bjomi we are closing this issue for now. You can always re-create/re-open the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ZIP Deploy failed · Issue #42 · Azure/webapps-deploy - GitHub
I've enabled GitHub Actions for my Azure App Service Dev Slot, but it fails on the deployment step using the webapps-deploy action.
Read more >
Error with GitHub Action Deploy to Azure Web App
Package deployment using ZIP Deploy initiated. Error: Failed to deploy web package to App Service. Error: Execution Exception (state: ...
Read more >
Azure App Service deploy v4 task - Microsoft Learn
Use this task to deploy to Azure App Service a web, mobile, or API app using Docker, Java, .NET, .NET Core, Node.js, PHP,...
Read more >
Error: Package deployment using ZIP Deploy failed
Hi all, I'm unable to deploy my Azure WebApp through Azure DevOps Pipelines because of an error at the latest stage of 'Deploy...
Read more >
How to: Deploy Azure Functions Using Github Actions
In this article we'll look at how to deploy an Azure Function App using a GitHub Actions automated workflows.
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