You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an IcM opened to track this with a reference number of 586893978.
Here is the sequence of events.
A valid zip is generated and is corrupted due to packet inspection or a corrupt zip file is generated somehow.
The repro is deployed using GitHub Actions and ZipDeploy.
The Deployment is reported as successful.
Steps to Repro
Create a new Function App. I used Linux in this scenario on the Basic Dedicated SKU.
Create a new Function App locally and add it to GIT. Compress the content to a Zip File.
Open the Zip file using a Hex Editor from the Windows App Store.
Remove the section at the top and add in bytes in the middle and the end.
Save this file.
Push this to GitHub.
Create a new Github Action like this,( I used a Federated Credential.
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
name: Deploy PowerShell project to Azure Function App
on:
workflow_dispatch: {}
push:
branches: ["main"]
env:
AZURE_FUNCTIONAPP_NAME: '' # set this to your function app name on Azure
AZURE_FUNCTIONAPP_PACKAGE_PATH: '' # set this to the path to your function app project, defaults to the repository root
Using RBAC for authentication, GitHub Action will perform resource validation.
Successfully acquired site configs from function app!
Detected function app sku: Dedicated
Successfully acquired app settings from function app (RBAC)!
Detected function app language: Powershell
Will directly deploy <corruptzip.zip> as function app content.
Will use https:///api/zipdeploy to deploy since RBAC Azure credential is detected.
Package deployment using ZIP Deploy initiated.
Deploy logs can be viewed at https://.scm.azurewebsites.net/api/deployments/97737448-ca80-4060-b695-712cf039c1b8/log Successfully deployed web package to App Service.
Looking at the Logs in Kudu we can see this file is corrupted.
E.G.
{"timestamp": "2025-01-31T23:30:32.685Z", "level": "Error", "containerName": "7c358fa540b6", "machineName": "lw1sdlwk00047R", "message": "Exception in extracting and setting permissions on the zip file System.IO.Abstractions.FileInfoWrapper:System.IO.InvalidDataException: Offset to Central Directory cannot be held in an Int64.\n at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()\n at System.IO.Compression.ZipArchive..ctor(Stream , ZipArchiveMode , Boolean , Encoding )\n at System.IO.Compression.ZipArchive..ctor(Stream , ZipArchiveMode )\n at Kudu.Services.Deployment.PushDeploymentController.LocalZipFetch(IRepository repository, DeploymentInfoBase deploymentInfo, String targetBranch, ILogger logger, ITracer tracer) in /tmp/KuduLite/Kudu.Services/Deployment/PushDeploymentController.cs:line 934"}
This doesn't show up in the Log Stream either.
Current Result
The deployment shows as successful although the app is in an unworking state.
Expected Result
The deployment should check the App Status post deployment and somehow track this error.
The text was updated successfully, but these errors were encountered:
Description
We have an IcM opened to track this with a reference number of 586893978.
Here is the sequence of events.
Steps to Repro
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
name: Deploy PowerShell project to Azure Function App
on:
workflow_dispatch: {}
push:
branches: ["main"]
env:
AZURE_FUNCTIONAPP_NAME: '' # set this to your function app name on Azure
AZURE_FUNCTIONAPP_PACKAGE_PATH: '' # set this to the path to your function app project, defaults to the repository root
jobs:
runs-on: ubuntu-latest
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
The deployment shows as succesful.
Using RBAC for authentication, GitHub Action will perform resource validation.
Successfully acquired site configs from function app!
Detected function app sku: Dedicated
Successfully acquired app settings from function app (RBAC)!
Detected function app language: Powershell
Will directly deploy <corruptzip.zip> as function app content.
Will use https:///api/zipdeploy to deploy since RBAC Azure credential is detected.
Package deployment using ZIP Deploy initiated.
Deploy logs can be viewed at https://.scm.azurewebsites.net/api/deployments/97737448-ca80-4060-b695-712cf039c1b8/log
Successfully deployed web package to App Service.
Looking at the Logs in Kudu we can see this file is corrupted.
E.G.
{"timestamp": "2025-01-31T23:30:32.685Z", "level": "Error", "containerName": "7c358fa540b6", "machineName": "lw1sdlwk00047R", "message": "Exception in extracting and setting permissions on the zip file System.IO.Abstractions.FileInfoWrapper:System.IO.InvalidDataException: Offset to Central Directory cannot be held in an Int64.\n at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()\n at System.IO.Compression.ZipArchive..ctor(Stream , ZipArchiveMode , Boolean , Encoding )\n at System.IO.Compression.ZipArchive..ctor(Stream , ZipArchiveMode )\n at Kudu.Services.Deployment.PushDeploymentController.LocalZipFetch(IRepository repository, DeploymentInfoBase deploymentInfo, String targetBranch, ILogger logger, ITracer tracer) in /tmp/KuduLite/Kudu.Services/Deployment/PushDeploymentController.cs:line 934"}
This doesn't show up in the Log Stream either.
Current Result
The deployment shows as successful although the app is in an unworking state.
Expected Result
The deployment should check the App Status post deployment and somehow track this error.
The text was updated successfully, but these errors were encountered: