Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az webapp deploy fails with Kudu Sync error #30955

Open
williamhbell opened this issue Mar 5, 2025 · 3 comments
Open

az webapp deploy fails with Kudu Sync error #30955

williamhbell opened this issue Mar 5, 2025 · 3 comments
Assignees
Labels
app-service-deployment app-service-general Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Web Apps az webapp

Comments

@williamhbell
Copy link

Describe the bug

Created a Linux App Service plan, using:

    "kind": "linux",
    "sku": {
      "capabilities": null,
      "capacity": 1,
      "family": "B",
      "locations": null,
      "name": "B3",
      "size": "B3",
      "skuCapacity": null,
      "tier": "Basic"
    },

Having set some variables, created a Web App using:

az webapp create --name "$app_name" `
--resource-group "$resource_group" `
--plan "$plan" `
--runtime "python:3.11" `
--startup-file startup.txt

Attempted to deploy the web app using:

az webapp deploy --name $app_name `
--resource-group $resource_group `
--src-path ./app.zip `
--clean

The build fails, since the Python code in app.zip includes one or more subdirectories. After some investigation on the App Service Plan, the deployment process tries to create directories with a backslash. This does not work on Linux. The result is that

routes/some_route.py

becomes

routes\some_route.py

which is a single file on Linux. The routes directory is not created. If all subdirectories are removed, the deployment works. If one or more subdirectories are included, Kudu fails to create them and the deployment crashes. Kudu appears to be using a non-portable mechanism for creating directories that may work on Windows but does not work on Linux.

Related command

az webapp deploy

Errors

2025-02-13T22:43:07  Clean deploying to /home/site/wwwroot
2025-02-13T22:43:07  Generating deployment script.
2025-02-13T22:43:07    Using cached version of deployment script (command: 'azure -y --no-dot-deployment -r "/tmp/zipdeploy/extracted" -o "/home/site/deployments/tools" --basic --sitePath "/tmp/zipdeploy/extracted"').
2025-02-13T22:43:07  Running deployment command...
2025-02-13T22:43:07    Command: "/home/site/deployments/tools/deploy.sh"
2025-02-13T22:43:07    Handling Basic Web Site deployment.
2025-02-13T22:43:07    Kudu sync from: '/tmp/zipdeploy/extracted' to: '/home/site/wwwroot'
2025-02-13T22:43:07    Copying file: 'DigiCertGlobalRootCA.crt.pem'
2025-02-13T22:43:07    Copying file: 'data\Directions.csv'
2025-02-13T22:43:07    Copying file: 'dbutils.py'
2025-02-13T22:43:07    Copying file: 'fileutils.py'
2025-02-13T22:43:07    Copying file: 'models.py'
2025-02-13T22:43:07    Error: EINVAL: invalid argument, open '/home/site/wwwroot/data\Directions.csv'
2025-02-13T22:43:07    An error has occurred during web site deployment.
2025-02-13T22:43:07    Kudu Sync failed

Issue script & Debug output

Too much sensitive information.

Expected behavior

The web app should deploy correctly, such that the directories that are within the .zip file are created on the App Service Plan.

Environment Summary

azure-cli                         2.69.0 *

core                              2.69.0 *
telemetry                          1.1.0

Extensions:
application-insights               1.2.2

Dependencies:
msal                            1.31.2b1
azure-mgmt-resource               23.1.1

Additional context

When the web app is run locally or using Docker, it works as normal. It is possible to deploy it to the Linux App Service Plan using a Docker image, whereas the zip deployment fails as noted in this bug report.

@williamhbell williamhbell added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Mar 5, 2025
Copy link

Hi @williamhbell,

2.69.0 is not the latest Azure CLI(2.70.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Mar 5, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Web Apps az webapp Service Attention This issue is responsible by Azure service team. labels Mar 5, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 5, 2025

Thank you for opening this issue, we will look into it.

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-service-deployment app-service-general Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Web Apps az webapp
Projects
None yet
Development

No branches or pull requests

4 participants