To Reproduce
Code to reproduce: https://github.com/Euphoric/EventStoreHttpError
Expected behavior
Works correctly.
Actual behavior
Throws exception with "Request protocol 'HTTP/1.1' is not supported."
EventStore details
Operating system: Windows
EventStore client version (if applicable): 20.6.1 in .NET 5 (5.0.100-rc.1.20452.10)
Additional context
Works when run against 20.6.0 in Dev mode with TLS.
Works when run in .NET Core 3.1 against 20.6.1
I haven't found any mentions of .NET 5 breaking backwards compatibility of GRPC.
I have verified this error doesn't happen when running against 20.6.1 with TLS enabled. So there must be something weird with the insecure mode.
@Euphoric thanks for the report.
It is possible that the application is not setting the HTTP/2 prior knowledge mode properly.
Could you please try to set the following at the beginning of your main function and let us know if it works?
AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);
@shaan1337 Setting that doesn't change the behavior.
I've just encountered this myself. Has anyone been able to figure out a workaround?
EDIT: I found this which gave me the clue to get this working. I just added the Grpc.Net.Client package to my project directly. It's a dependency of EventStore.Client.Grpc, but it was installing v2.29.0 for me, rather than the latest v2.32.0 which appears to fix the issue with the Http2UnencryptedSupport switch.
I confirm that updating Grpc.Net.Client to 2.32.0 fixed this problem.
Just ran into this myself
Most helpful comment
I've just encountered this myself. Has anyone been able to figure out a workaround?
EDIT: I found this which gave me the clue to get this working. I just added the Grpc.Net.Client package to my project directly. It's a dependency of EventStore.Client.Grpc, but it was installing v2.29.0 for me, rather than the latest v2.32.0 which appears to fix the issue with the Http2UnencryptedSupport switch.