b is not a function :b({code:2,message:“Incomplete response”} for grpcwebtext, but ok for grpcweb
See original GitHub issueHello!
I am trying to create client for my python grpc server.
My server implements server-side streaming methods and unary calls. As follows from library documentation, if I need streaming, i should compile my proto files with mode=grpcwebtext option
But, I also have following unary call method with bytes field in request:
message SaveUserDocumentRequest {
bytes content = 1;
}
message SaveUserDocumentResponse {
string url = 1;
}
service MyService {
rpc SaveUserDocument (SaveUserDocumentRequest) returns (SaveUserDocumentResponse);
}
Client code is:
uploadImage({ content }, callback) {
try {
let realRequest = new SaveUserDocumentRequest();
realRequest.setContent(content)
this.client.saveUserDocument(realRequest, {}, (err, response) => {
if(err) {
console.log(err)
return;
}
callback(response)
})
} catch(e) {
console.log(e)
}
}
if I compile my protofiles with option mode=grpcweb this rpc method works just fine (but other server-streaming methods don’t)
But if I compile my protofiles with option mode=grpcwebtext and trying to use this method, i got following exception:
b is not a function :b({code:2,message:“Incomplete response”}
Please, if you know, what am I doing wrong, let me know Thanks for your help!
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
how to decrypt grpc-web-text ? · Issue #634 - GitHub
[problem] I send a grpc-web-text to server successfully, but payload ... b is not a function :b({code:2,message:“Incomplete response”} for ...
Read more >index.js - Bundle Scanner
The parts of the code that are highlighted in grey are tokens that can be found in both places. Click on a token...
Read more >b({code:2,message:“Incomplete response”} for grpcwebtext ...
Hello! I am trying to create client for my python grpc server. My server implements server-side streaming methods and unary calls.
Read more >Grpc Grpc-Web Issues - IssueHint
b is not a function :b({code:2,message:“Incomplete response”} for grpcwebtext, but ok for grpcweb, closed, 7 ; Introducing new Enum value doesn't result in ......
Read more >grpc grpc-web Issues - Giters
b is not a function :b({code:2,message:“Incomplete response”} for grpcwebtext, but ok for grpcweb. Closed 4 months ago 7 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for your help! Somehow, after some iterations of development I can’t reproduce this issue any more. The sad thing is that I haven’t notice, what have I change to fix it:( But now all works just fine! So thank you very much!
Oh ok… 😅 In any case, glad it works for you now! 😃