Azure function core tools crashing on Mac when running HTTP triggered function

Carlos Garcia 0 Reputation points

I'm facing an issue when running Azure Functions locally using the Azure Functions Core Tools on macOS Sonoma 1.4.12 with .NET 7 and .NET 8 isolated worker. The error happens even when testing a vanilla HTTP-triggered function locally. Shortly after starting the function with func start, the host crashes with a Grpc.Core.RpcException / HttpRequestException.

I have been developing functions locally in the same environment during months, but some weeks ago the debugger started crashing on the same code. I did some research on this and all I have found is related to Grpc development, which is not the case. This is just the template HTTP function created by func core tools. I used this for simplicity to isolate the issue.

Error Details:

The function starts correctly but then crashes with this Grpc/HttpRequestException exception:

Unhandled exception. Grpc
Unhandled exception. Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 connection.", DebugException="System.Net.Http.HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 connection.")

Steps to Reproduce:

The error occurs by simply following the Develop Azure Functions locally using Core Tools guide from Microsoft to create a project and a test HTTP-triggered function with the func tools:

  1. Create a new project with func init MyProjFolder --worker-runtime dotnet-isolated
  2. Add an HTTP trigger with func new --template "Http Trigger" --name MyHttpTrigger
  3. Navigate to MyProjFolder and start the function with func start

Environment Details:

  • Azure Function Core Tools version: 4
  • .NET versions: 7 and 8 (isolated)
  • OS: macOS Sonoma version 1.4.12
  • CPU architecture: x64

Attempts to Resolve:

Since I suspect the problem was with my development environment, I've tried reinstalling both the Azure Functions Core Tools and .NET frameworks without success.

Interestingly, the same codebase executes flawlessly on a Windows 10 system and also when deployed directly to Azure. It's worth noting that I'm not explicitly using gRPC in my function, and this issue has only started occurring recently.

Has anyone faced a similar issue or have any suggestions on how to resolve this gRPC connection error on macOS with dotnet-isolated for Azure Functions? Any insights or workarounds would be greatly appreciated

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,216 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,656 Reputation points Microsoft Employee

    Hello @Carlos Garcia - Are you possibly working behind a local network (corporate) with proxy? The fact that you're hitting the issue only with the HTTP trigger makes me think it may be an issue similar to the following answer:

    0 comments No comments