Open divan opened 2 weeks ago
It's the simple file upload chunking code that works fine on native platforms
There are two different protocols, grpc
and grpc-web
, which are only related by name.
- Is it correct that grpc-dart client-side streaming is not working for apps built for web platform?
Yes, grpc-web
does not support client-side streaming at the moment.
- If so, any solutions/workarounds?
I am no expert, but I would probably try using multiple unary requests.
Hi, I'm having an issue with streaming only when compiled to the web platform. It's the simple file upload chunking code that works fine on native platforms:
upload.dart
proto file:
But on web it returns this for every chunk:
Seems like after the initial metadata, the sending connection is closed/cancelled, and subsequent chunks sends are resulting in this error. I can't, however, see any errors neither on server nor on client (using logging with interceptors).
Meanwhile, as I understood, grpc-dart is using grpc-web under the hood, and on the
grpc-web
README page, there is a paragraph:Server-side Streaming RPCs (example) (NOTE: Only when grpcwebtext mode is used.) Client-side and Bi-directional streaming is not currently supported (see streaming roadmap).
It leads to this document: https://github.com/grpc/grpc-web/blob/master/doc/streaming-roadmap.md, which is basically saying, "forget about streaming support from the client".
So, I have two questions: