skip to Main Content

I have created an Azure function app, from my VS Code. This function is being deployed to Azure from VScode.

While Deployment Many times it returns "Error: Deployment ‘latest’ not found, While Deploying the Azure Function app" or "Error: The Operation was aborted", Even I haven’t aborted the Deployment. The latest version is always available to Azure there is no modification done via Azure Portal.

Are retrying few times the deployment is successful without returning any error. I have added some snapshot for better understanding.

Image

Error Image

Error Image

2

Answers


  1. VSCode gives such errors while deploying the function app using Command palette azure functions: deploy to function app or Deploy to function app due to various reasons.

    enter image description here

    In such cases, you can deploy the function to Azure Function App using the publish command func azure functionapp publish <functionapp_name> --build remote.

    • Also, add AzureWebJobsStorage application setting in local.settings.json(if it is missing).
    {
      "IsEncrypted": false,
      "Values": {
        "FUNCTIONS_WORKER_RUNTIME": "python",
        "AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
        "AzureWebJobsStorage": "UseDevelopmentStorage=true"
      }
    }
    

    To run the publish command, you must have Azure function core tools installed.

    If you haven’t installed, open Terminal and run the command to install Core Tools:

    npm i -g azure-functions-core-tools@2 --unsafe-perm true
    
    • Navigate to Root directory of your function project in VScode=>Terminal and run func azure functionapp publish <functionapp_name>.

    enter image description here

    enter image description here

    Portal:

    enter image description here

    Login or Signup to reply.
  2. I can confirm this happened to me while deploying with Azure Function Core Tools.

    In my case, I managed to get past this issue by manually deleting the function (deactivating) the function inside the function_app.

    Sometimes, I even tried to repeatedly to deploy it and it worked after some times (4th/5th attempt).

    Pravallika KV’s answer is a good alternative indeed, in my case I didn’t have to resort to it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search