Skip to content

[BUG]: Error on startup when using devproxy with Azure Functions Isolated Worker (HTTP/2 Connection) #851

Open
@shueseman

Description

@shueseman

Description

I am trying to use devproxy with my Azure Functions (isolated worker) to simulate errors with Graph. However, after running devproxy, then launching my function in debug mode, I get the following error:

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.")'

It looks like a similar issue was reported before with Fiddler (another proxy), so it's something to do with the proxy itself:

https://stackoverflow.com/questions/68724527/fiddler-with-dotnet-isolated-az-function-error-starting-grpc-call

I looked over the devproxy config options and other documentation, and don't see anything that address this. Any ideas?

Expected behaviour

Able to startup Azure Function Isolated Worker in debug mode while devproxy is running.

Actual behaviour

Error above is thrown during HostBuilder.RunAsync

Steps to reproduce

Start devproxy
In Visual Studio 2022, launch debug mode on an Azure Function Isolated Worker project.

Dev Proxy Version

0.19.1

Operating system (environment)

Windows

Shell

cmd

Configuration file

{
"$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.19.1/rc.schema.json",
"plugins": [
{
"name": "RetryAfterPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll"
},
{
"name": "GenericRandomErrorPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
"configSection": "genericRandomErrorPlugin"
},
{
"name": "GraphRandomErrorPlugin",
"enabled": true,
"pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
"configSection": "graphRandomErrorPlugin",
"urlsToWatch": [
"https://graph.microsoft.com/v1.0/",
"https://graph.microsoft.com/beta/
",
"https://graph.microsoft.us/v1.0/",
"https://graph.microsoft.us/beta/
",
"https://dod-graph.microsoft.us/v1.0/",
"https://dod-graph.microsoft.us/beta/
",
"https://microsoftgraph.chinacloudapi.cn/v1.0/",
"https://microsoftgraph.chinacloudapi.cn/beta/
"
]
}
],
"urlsToWatch": [
"https://jsonplaceholder.typicode.com/",
"https://graph.microsoft.com/
",
"https://graph.microsoft.us/*"
],
"genericRandomErrorPlugin": {
"errorsFile": "devproxy-errors.json"
},
"rate": 50,
"logLevel": "information",
"newVersionNotification": "stable"
}

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions