7

All of our Azure function apps are failing to execute manually from the Azure Portal. When we go to do Test/Run for any of our functions in any function app, we get the following error:

Http response code: 0 Unknown HTTP error

Http response content: Error: {"message":"Failed to fetch","stack":"TypeError: Failed to fetch\n at https://portal.azure.com/Content/Dynamic/fOu-tO_OJd0O.js:226:23724","isError":true}

enter image description here

All of our functions are configured the following way:

  • FUNCTIONS_EXTENSION_VERSION = ~4
  • FUNCTIONS_WORKER_RUNTIME = dotnet-isolated
  • CORS -> Allowed Origins = https://portal.azure.com
  • All C# code is .net 8

Executing manually from the Azure portal was working a week or two ago, and we've not made any changes that we can think of. Any ideas?

2
  • 1
    FWIW, I opened a question with Microsoft Q&A for this issue. We first noticed the problem on Tuesday. learn.microsoft.com/en-us/answers/questions/1696053/… Commented Jun 13, 2024 at 19:30
  • I've opened a ticket as well, they are investigating it. Commented Jun 17, 2024 at 19:58

2 Answers 2

4

Do you have any "Inbound traffic configuration" restrictions in the "Networking" tab?

We had the same issue.

Initially, we had a function app without any restrictions in terms of IP addresses and manual Test/Run" functionality worked fine.

Then we were told to add IP restrictions and left access only for our internal Azure services. When we did this - "Test/Run" stopped working and we started getting "0 Unknown HTTP error".

After that, we whitelisted our IP addresses and "Test/Run" revived. enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

I should have included in my comment that we also were able to do this as a workaround. However, prior to 6/11 we also had that in place and Test/Run did work. Good call out on the workaround!
Nice find, yes, we have access restrictions in place, limited to Serviced Tag = AzureCloud. However when I grant my IP address access, it works successfully.
Just heard back from MSFT - this is by design. If you had Access Restrictions in place, and relied on Service Tag = AzureCloud , then you must grant yourself explicit access as the ServiceTag = AzureCloud is no longer honored.
1

I got the same error when I deployed .NET 8.0 isolated Azure functions from visual studio to Azure function app.

enter image description here

To resolve this, click on CORS URL in the warning=> it redirects to the CORS page. In the "Allowed Origins" section, add * to allow access to all origins.

  • Check if the allowed origin is reflecting under CORS after updating successfully.

enter image description here

Application Settings of function app:

enter image description here

Able to run the function as expected after enabling CORS.

enter image description here

6 Comments

In the original post you can see that Greg has the specific URL included as an allowable origin in CORS configuration. I tried adding * as you suggested and it had no effect.
Can you please share your CORS configuration screenshot?
I have portal.azure.com, and ms support suggested ms.portal.azure.com, neither work. But I did open a ticket and they are still working on it.
Not working for me either.. Also, get the following when trying to set *.. The Access-Control-Allow-Credentials response header is not compatible with wildcard origin.
You have to uncheck Access-Control-Allow-Credentials in CORS page.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.