Hosted Agent with Azure-cli 2.77: ERROR: The specified blob already exists

Angelina Souy 40 Reputation points
2025-09-11T06:47:33.2933333+00:00

Since Tuesday, the Hosted Agent updated the version of azure-cli to 2.77 and I get this error since then:

ERROR: The specified blob already exists.
RequestId:162e9f38-701e-004e-1b60-215d8e000000
Time:2025-09-09T08:06:02.3395538Z
ErrorCode:BlobAlreadyExists

Here the the failing command that was working:

az batch application package create --application-name ${{parameters.applicationName}} --name ${{parameters.batchName}} --package-file "$(Pipeline.Workspace)/drop/${{parameters.projectName}}.zip" --resource-group ${{parameters.resourceGroup}} --version-name mojito-${{ lower(parameters.environment) }}

I changed my command to create a new version each time, but now, the uploaded application zip file is only containing the zip path instead of the whole file!

D:\a\1\drop\MojitoUpload.zip

There is a huge regression on azure-cli 2.77, please fix this as soon as possible.

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
{count} votes

Answer accepted by question author
  1. Jilakara Hemalatha 3,355 Reputation points Microsoft External Staff Moderator
    2025-09-12T04:27:55.4766667+00:00

    Hi Angelina Souy,

    Thanks for bringing your issue. This issue you are facing is due to a regression introduced in Azure CLI version 2.77, specifically affecting the az batch application package create command.

    In this version, when executing the command, it tries to upload the application package blob but does not handle existing blobs correctly. Even when providing a new version name, instead of uploading the actual zip file content, it mistakenly uploads just the file path as a string rather than the file itself.

    I have found that this regression issue tracked in Azure CLI GitHub repository three days ago.

    https://github.com/Azure/azure-cli/issues/32086

    As a workaround we recommend you to:

    Use Azure REST API or the Azure Batch SDK to upload application packages.

    Use an older Azure CLI version (e.g., 2.76) where this command works as expected.

    Please refer official release notes of Azure CLI version 2.77 September version: https://free.blessedness.top/en-us/cli/azure/release-notes-azure-cli?view=azure-cli-latest

    Please let me know if you have any other queries.

    If the answer is helpful, please click "Accept Answer" and "Upvote it."

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.