Protobuf Illegal Wire Type
protobuf.min.js:63 Uncaught Error: Illegal wire type for field Message.Field .Data_new.vert: 5 (2 expected) I get this message when I try to decode my binary file with protobuf
Solution 1:
So finally I figured it out! The problem was outside the code I posted ! I only set up an Ostream to write the binary data into, but instead I needed to actually state, that the file I want to write in is binary. So thank you all for your help and advice.
Solution 2:
It looks like you're serializing the field as if it's not packed
. Are you using an older version of the proto to serialize your data?
Wire type 5 is a 32-bit fixed-width field (fixed32, sfixed32, or float), which would match repeated float values = 1
. Wire type 2 is a length-delimited field (string, bytes, message, or packed repeated field), which matches what's in the proto you posted (repeated float values = 1 [packed = true]
).
Post a Comment for "Protobuf Illegal Wire Type"