Azure/azure-functions-dotnet-worker

Unable to publish linux function upgrated to dotnet8 Isolated to Azure - HTTP status code Conflict

lasyan3 opened this issue · 4 comments

Description

Hi,

I upgraded an Azure Function (Linux) which was in dotnet 6 in-process model to dotnet 8 Isolated model following the documentation.

The function runs fine in local, but I cannot publish it to Azure. I get the error "The attempt to publish the ZIP file through https://.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code Conflict."

I'm using Visual Studio 2022 17.9.4 and the latest available version of Azure Function Tools (Tools > Options > Projets and solutions > Azure Functions).

I use the default publish profile created by VS,without changing any property :

  • Configuration : release
  • Runtime : linux-x64
  • Target framework : net8.0
  • Deployment mode : framework-dependant

The logs in tmp file just keep saying : "we were unable to determine the root cause of the error"...

Any help appreciated.

Steps to reproduce

Try to publish to Azure function linux.

Hi @lasyan3 , have you tried engaging support? They would be in a better position to look at a deployment issue and what is happening to your specific app here.

The message above also seems strange if it wasn't edited, as it seems to be missing your app in for the SCM endpoint.

Does the error persist with other deployment options? https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies

Hi @fabiocav engaging support is really the last option. But if I have no choice... I can tell issue only happens on Linux function, it's working fine on Windows. And I'm using Zip deploy as recommended in the doc.

Ok I created a new function and publish worked. So definitely something to do with the azure function...

Edit : if you create a function from the portal, after creation go to "Configuration" and put "SCM Basic Auth Publishing Credentials" to "On" if you want to publish from Visual Studio...

Ok found a possible cause for this issue: check the CORS parameter of your function app, it may be set to "portal.azure.com".
Once I remove it and uncheck "Enable Access-Control-Allow-Credentials", the publish works.
I close the ticket, no need to bother the dotnet worker team as this is clearly related to Azure.