Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.net.ProtocolException: WireInput encountered a malformed varint , need help ,someone have any idea? #618

Closed
busyfree opened this issue Jul 27, 2016 · 3 comments

Comments

@busyfree
Copy link

java.net.ProtocolException: WireInput encountered a malformed varint
07-27 00:46:01.099 6479-6479/® W/System.err: at com.squareup.wire.ProtoReader.readVarint64(ProtoReader.java:338)
07-27 00:46:01.099 6479-6479/pb.wiretest W/System.err: at com.squareup.wire.ProtoAdapter$8.decode(ProtoAdapter.java:307)
07-27 00:46:01.099 6479-6479/pb.wiretest W/System.err: at com.squareup.wire.ProtoAdapter$8.decode(ProtoAdapter.java:297)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at com.td.pb.live.PBLive$ProtoAdapter_PBLive.decode(PBLive.java:459)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at com.td.pb.live.PBLive$ProtoAdapter_PBLive.decode(PBLive.java:412)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.java:182)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at com.squareup.wire.ProtoAdapter.decode(ProtoAdapter.java:164)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at pb.wiretest.home.Mainv1Activity$1.onNext(Mainv1Activity.java:84)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at pb.wiretest.home.Mainv1Activity$1.onNext(Mainv1Activity.java:70)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:215)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at android.os.Handler.handleCallback(Handler.java:739)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at android.os.Looper.loop(Looper.java:148)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at java.lang.reflect.Method.invoke(Native Method)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
07-27 00:46:01.100 6479-6479/pb.wiretest W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

@JakeWharton
Copy link
Member

What bytes were transmitted and what does your proto look like that was expected?

@busyfree
Copy link
Author

proto define:

message PBLive{

optional sint64 id=1;
optional string title=2;

}
byte arr: [10 37 18 28 229 146 154 229 146 154 231 155 180 230 146 173 44 229 133 168 231 144 131 233 166 150 229 143 145 33 33 33 48 1 58 1 48 80 2]

@busyfree
Copy link
Author

my mistake ,i have fixed ,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants