non-asycn gRPC call hangs browser
See original GitHub issueWhat version of gRPC and what language are you using?
Client - netstandard2.1, Grpc.Net.Client.Web Version 2.27.0-pre1 Server - netcoreapp3.1, Grpc.AspNetCore Version 2.27.0, Grpc.AspNetCore.Web Version 2.27.0-pre1 Shared - netstandard2.1, Google.Protobuf Version 3.11.3, Grpc.Net.Client Version 2.27.0, Grpc.Tools Version 2.27.0
What operating system (Linux, Windows,…) and version?
Windows 10
What runtime / compiler are you using (e.g. .NET Core SDK version dotnet --info
)
Core 3.1.100 Blazor 3.2
What did you do?
Calling gRPC non-async causes the browser (both Edge and Chrome) to hang. Edge will sometimes pop a ‘long running script’ error. Browsers have to be closed via task manager. Sample available here - https://github.com/ThatRickGuy/WASM-Blazor-gRPC-Sample in the FetchData.razor file, comment/uncomment the “This works” and “This doesn’t” blocks. In the non-async call, the server receives and processes the request, but the client doesn’t get the response.
What did you expect to see?
A successful non-async call to the gRPC service
What did you see instead?
Browser hangs
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
I think the right thing to do here is document this at https://docs.microsoft.com/en-us/aspnet/core/grpc/browser?view=aspnetcore-3.1#configure-grpc-web-with-the-net-grpc-client
Excellent! That will hopefully help others from making the same mistake I made! 😃