Skip to content

解析报错PHP Fatal error: Uncaught Google\Protobuf\Internal\GPBDecodeException: Error occurred during parsing: Unexpected wire type. #9

@hylun

Description

@hylun

解析复杂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; //用户列表
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions