Closed VincentMarnier closed 1 year ago
Just so you know, it works if I use mode=grpcwebtext
and --js_out=import_style=commonjs
instead of mode=grpcweb
and --js_out=import_style=commonjs,binary
.
I will stick with text for now so. Not sure if it is an issue from grpc-web or if I misunderstood something out there. I'm leaving it open in case it is a bug, feel free to close it if it is not!
Hi thanks for the report!
Actually, i think what you've observed is expected — streaming is currently only supported with mode=grpcwebtext
but not mode=grpcweb
, as documented here.. :)
I'm sorry for the inconvenience but for now you need to use grpcwebtext
if you want server streaming. :)
I'm closing this issue but feel free to reopen or follow up with more details if needed. Thanks!
Hello, I am using grpc-web with React Native for my client and ASP.NET + Grpc.AspNetCore.Web package for my server. So far unary calls work wonderfuly, yet when I try to use server-side streaming RPC, I receive no events. If the server ends the connection, every events from the begining of the connection are raised all at once. It feels like events are not flushed as soon as possible or something. My problem seems not to come from the server as it works if I am using grpc-web from a C# client (source: https://learn.microsoft.com/en-us/aspnet/core/grpc/grpcweb?view=aspnetcore-7.0#configure-grpc-web-with-the-net-grpc-client).
My code exactly:
ChatClient is generated using:
protoc -I=Chat/ --js_out=import_style=commonjs,binary:webclient/Chat/src/APIClient --grpc-web_out=import_style=typescript,mode=grpcweb:webclient/Chat/src/APIClient Chat/*.proto
Is there something I am missing?