I defined gRPC service as below.

syntax = "proto3";

import "google/protobuf/empty.proto";

service Greeter {
  rpc GenGrpc  (GenGrpcMsg)            returns (google.protobuf.Empty) {} 
// rpc to send general IPC
}

message GenGrpcMsg {
  string ipc = 1;
}



I called gRPC call by async method like below, ipcStream is string 
including some information. 

void GrpcClientHandle::sendMsg(const std::string& ipcStream) 
{
...
  request.set_ipc(ipcStream);
    call->response_reader_ = stub_->PrepareAsyncGenGrpc(&call->context_, 
request, &cq_);
    call->response_reader_->StartCall();
    call->response_reader_->Finish(&call->reply_, &call->status_, 
(void*)call);    
...
}


But cq_.Next() return "Unable to parse request(13)"

 AsyncCompleteRpc RPC failed, Reason = Unable to parse request(13)
 AsyncCompleteRpc Detail Reason = 
{"created":"@1560861469.766302644","description":"Error received from 
peer","file":"src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Unable
 
to parse request","grpc_status":13}

In case that I set ipc by const string as below, It works fine.
request.set_ipc("ABC");


I wonder what caused this symptom.
Is it a symptom that occurs when abnormal value is included with protobuff 
string value? 
Or is there any restriction on protobuff string type?



-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/8cbc4233-1eb6-4c5e-8f68-e3a8fde15a2e%40googlegroups.com.

Reply via email to