我不断获得以下堆栈跟踪,但我不确定它的含义。
Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag.
at com.google.protobuf.InvalidProtocolBufferException.invalidEndTag(InvalidProtocolBufferException.java:73)
at com.google.protobuf.CodedInputStream.checkLastTagWas(CodedInputStream.java:124)
at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:189)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:732)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:238)
at com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:178)
at com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:724)
答案 0 :(得分:13)
protobuf中的组被写为开始/结束数字对 - 有点像<foo>
需要</foo>
的方式,但格式不同。基本上它抱怨它发现了一个</bar>
(只是:xml只是一个比喻)。细节在encoding specification,但是长和短是以下之一:
如果我不得不猜测,数据在传输过程中已经损坏 - 因为that is so frighteningly common