azure-pipelines-tasks: Azure App Service Deploy 4.3.0 zip deploy broken

Environment

  • Server - VSTS

  • Agent - Private (ubuntu-16.04)

Issue Description

Using Azure App Service Deploy 4.3.0 task to deploy a package does not work. This appears to be a regression in 4.3.0 since we have successful deployments using version 4.2.9.

Error logs

2018-08-22T12:15:39.4085490Z ##[section]Starting: Deploy Azure App Service
2018-08-22T12:15:39.4219696Z ==============================================================================
2018-08-22T12:15:39.4234791Z Task         : Azure App Service Deploy
2018-08-22T12:15:39.4251895Z Description  : Update Azure WebApp Services On Windows, Web App On Linux with built-in images or docker containers, ASP.NET, .NET Core, PHP, Python or Node based Web applications, Function Apps, Mobile Apps, Api applications, Web Jobs using Web Deploy / Kudu REST APIs
2018-08-22T12:15:39.4269792Z Version      : 4.3.0
2018-08-22T12:15:39.4284717Z Author       : Microsoft Corporation
2018-08-22T12:15:39.4301165Z Help         : [More Information](https://aka.ms/azurermwebdeployreadme)
2018-08-22T12:15:39.4316089Z ==============================================================================
2018-08-22T12:15:40.3371032Z Got service connection details for Azure App Service:'<redacted>'
2018-08-22T12:15:42.8677452Z App Service Application URL: <redacted>
2018-08-22T12:15:42.8831994Z Updating App Service Application settings. Data: {"WEBSITE_RUN_FROM_ZIP":"0"}
2018-08-22T12:15:44.3087425Z Updated App Service Application settings and Kudu Application settings.
2018-08-22T12:15:44.3115631Z Package deployment using ZIP Deploy initiated.
2018-08-22T12:15:44.3265211Z ##[error]Unhandled: EISDIR: illegal operation on a directory, read
2018-08-22T12:15:48.7934048Z Fetching changes.
2018-08-22T12:15:49.0716808Z Cleaning up temp folders from previous zip deployments and extracting pushed zip file D:\local\Temp\zipdeploy\bohkjgxu.zip (0.00 MB) to D:\local\Temp\zipdeploy\extracted
2018-08-22T12:15:49.0732278Z Central Directory corrupt.
2018-08-22T12:15:49.0768705Z ##[error]Failed to deploy web package to App Service.
2018-08-22T12:15:49.0824994Z ##[error]Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
2018-08-22T12:15:51.1259489Z ##[warning]Can\'t find loc string for key: FailedToUpdateApplicationInsightsResource
2018-08-22T12:15:51.1298708Z Failed to add release annotation. Error: FailedToUpdateApplicationInsightsResource <redacted> undefined - undefined (CODE: 201)
2018-08-22T12:15:51.5233410Z Successfully updated deployment History at <redacted>
2018-08-22T12:15:51.6098126Z ##[section]Finishing: Deploy Azure App Service

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 38 (9 by maintainers)

Most upvoted comments

I Solve the problem adding this to the application settings.

KUDU_EXTENSION_VERSION 78.11002.3584

I am also seeing issues with zip deploy and version 4.3.7. The deployment process was working last Friday, but now I get a vague error “Failed to deploy web package to App Service. Bad Request (CODE: 400)”. I updated the VSTS Azure App Service Deploy task to use version 3 but then see a different error: "An error was encountered when processing operation ‘Create Directory’ on D:\home\site\wwwroot\bin. The error code was 0x800703E6. Invalid access to memory location’.

I too am now seeing this same issue when using zip deploy and version 4.3.7. I know it was working as recent as the 16th without issue.

Same problem here, I had my pipeline configured one month ago, but since 3 or 4 hours ago started to fail in web app deploys(version 4.3.7)… it throw me:

2018-10-22T18:58:23.3366444Z ##[error]Failed to deploy web package to App Service. 2018-10-22T18:58:23.3377987Z ##[error]Error: Error: Failed to deploy web package to App Service. Bad Request (CODE: 400)

I create a new web app in azure and i have the result. Please need help with this… whats is happening?

Hi.

I’m getting the same issue here. My azure devops version is running version 4.* - here’s my yaml:

steps:
- task: AzureRmWebAppDeployment@4
  displayName: 'Azure App Service Deploy'
  inputs:
    azureSubscription: 'xxx'
    WebAppName: xxx
    deployToSlotOrASE: true
    ResourceGroupName: xxx
    SlotName: staging

I also observe that if I try to manually do a zip deploy through kudu, that just hangs on “fetching changes”. I observed this on another deployment slot and the only workaround there was to delete the entire deployment slot and recreate it - then it worked fine. But I’d rather not spend days removing and recreating deployment slots.

@darewreck54

Add the setting to the application settings of your App Service.

image

So, A work around for anyone one else who may have this weird issue, here’s what I did:

  • On the Azure App Service Deploy task in your VSTS definition, Select Version 3.*, dropping down from 4. *(preview)

  • In Azure, drop the App Service resource group

  • Recreate the App Service resource group in Azure, either manually or through ARM templates

  • In VSTS, Create a new release and deploy

  • The release should now succeed

It seems to have something to do with the compatibility of the Azure App Service Deploy 4.*(preview) VSTS task and the Azure App Service. Common sense assumption is the App Service Deploy preview version has gotten further ahead of the now much older version of the App Service that was deployed to Azure some time ago. Selecting a stable version of App Service Deploy VSTS task and deploying a more current App Service seems to resolve the issue.

@lachiemurray , sorry for the issue you are facing. We found the cause of the issue and working on the fix.