pnp / graph-connectors-samples

Microsoft Graph Connector samples
https://aka.ms/gc/samples
MIT License
35 stars 28 forks source link

dotnet-csharp-graphdocs-ttk - Grpc.Core.RpcException - Error starting gRPC call #51

Open jthake opened 2 weeks ago

jthake commented 2 weeks ago

In following the steps for Simulated debugging with Dev Proxy and its failing. Confirm for following Debug locally against a real Microsoft 365 tenan also fails.

I'm running Windows Version 10.0.22631 Build 22631, Visual Studio 2022 Enterprise edition Version 17.9.6, Microsoft .NET Framework 4.8.09032.

Grpc.Core.RpcException
  HResult=0x80131500
  Message=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.")
  Source=Grpc.Net.Client
  StackTrace:
   at Grpc.Net.Client.Internal.HttpContentClientStreamWriter`2.<WriteAsyncCore>d__19`1.MoveNext()
   at Grpc.Net.Client.Internal.HttpContentClientStreamWriter`2.<WriteCoreAsync>d__15.MoveNext()
   at Microsoft.Azure.Functions.Worker.Grpc.GrpcWorkerClientFactory.GrpcWorkerClient.<SendStartStreamMessageAsync>d__8.MoveNext()
   at Microsoft.Azure.Functions.Worker.Grpc.GrpcWorkerClientFactory.GrpcWorkerClient.<StartAsync>d__7.MoveNext()
   at Microsoft.Azure.Functions.Worker.WorkerHostedService.<StartAsync>d__3.MoveNext()
   at Microsoft.Extensions.Hosting.Internal.Host.<<StartAsync>b__15_1>d.MoveNext()
   at Microsoft.Extensions.Hosting.Internal.Host.<ForeachService>d__18`1.MoveNext()
   at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>d__15.MoveNext()
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.<RunAsync>d__4.MoveNext()
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.<RunAsync>d__4.MoveNext()
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Program.<Main>$(String[] args) in C:\src\graph-connectors-samples\graph-connectors-samples\samples\dotnet-csharp-graphdocs-ttk\Program.cs:line 82

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
HttpRequestException: Requesting HTTP version 2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 connection.
sebastienlevert commented 2 weeks ago

I'm getting the same as soon as I hit F5 on the sample.

Visual Studio Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.9.6

Windows Edition Windows 11 Enterprise Version 23H2 Installed on ‎2023-‎07-‎21 OS build 22631.3447 Experience Windows Feature Experience Pack 1000.22688.1000.0

image

waldekmastykarz commented 2 weeks ago

This is a known issue and happens when you start Functions while Dev Proxy is already running. Instead, stop Dev Proxy, start Azure Functions and then start Dev Proxy.