Open hylun opened 5 years ago
解析复杂grpc对象报错PHP Fatal error: Uncaught Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Unexpected wire type. propto定义大概如下:
service UserService { rpc GetUserList (UserListRequest) returns (UserListReply) {} } message User { int64 id = 1; // 自增ID int64 uid = 2; // UID string user_name = 3; // 积分名称 } message UserListRequest { } message UserListReply { repeated User list = 1; //用户列表 }
这个……你应该去Google官方仓库提吧
用官方的没有问题
protobuffer部分用的是官方的, 是指经客户端接收的数据出现了错误吗?
对
It can be occurs when client send encoded data. Think, need to consider implement logic to decode data based on grpc-encoding request header
解析复杂grpc对象报错PHP Fatal error: Uncaught Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Unexpected wire type. propto定义大概如下:
service UserService { rpc GetUserList (UserListRequest) returns (UserListReply) {} } message User { int64 id = 1; // 自增ID int64 uid = 2; // UID string user_name = 3; // 积分名称 } message UserListRequest { } message UserListReply { repeated User list = 1; //用户列表 }