You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: master/v3.6.0/v3.5.0 etc.
Language: Java/Javascript
MacOS 10.14.6
protoc gcc compiler
** Main Issue **
I am creating a Proto message in Java/Kotlin and sending it to a NodeJS server.
Right before being sent from Java, I see the message payload ArrayBuffer is viewed/sent as signed (Int8Array).
Right after being received in Node, I view the message ArrayBuffer and see that it is saved as unsigned (Uint8Array).
The two's complement conversion from signed to unsigned is done correctly, so the underlying ArrayBuffer has the same bits stored on both Java and Node. Same length too.
However, running DeserializeBinary() in Node on the Uint8Array gives me a AssertionError: Assertion failed ... at Function.proto.myproject.schema.MyMessageType.deserializeBinary error.
When I run DeserializeBinary() in Java with the same Uint8Array as I received in Node, it works completely fine.
How can DeserializeBinary() fail when parsing the exact same bits? The only difference is one is being run in Java and one is being run in Node. The fact that one is viewed as signed and one is viewed as unsigned shouldn't change anything right?
Obviously DeserializeBinary() won't accept it if I just pass in the Int8Array.
**Additional context: **
Also, with some tweaks in Node I get AssertionError: Failure: Decoder hit an error error instead of the generic one. Not sure if that is significant. I just don't use Buffer.concat() before passing to DeserializeBinary().
When creating/sending the Proto message from Objective-C, the ArrayBuffer is sent as unsigned.
Running DeserializeBinary() in Node on this ArrayBuffer gives no errors and works perfectly.
The only issue is when sending from Java to NodeJS, and the only difference between that and the Objective-C scenario is that the bits are viewed in different ways. But the actual bits are not different.
The text was updated successfully, but these errors were encountered:
Version: master/v3.6.0/v3.5.0 etc.
Language: Java/Javascript
MacOS 10.14.6
protoc gcc compiler
** Main Issue **
I am creating a Proto message in Java/Kotlin and sending it to a NodeJS server.
Right before being sent from Java, I see the message payload ArrayBuffer is viewed/sent as signed (Int8Array).
Right after being received in Node, I view the message ArrayBuffer and see that it is saved as unsigned (Uint8Array).
The two's complement conversion from signed to unsigned is done correctly, so the underlying ArrayBuffer has the same bits stored on both Java and Node. Same length too.
However, running DeserializeBinary() in Node on the Uint8Array gives me a
AssertionError: Assertion failed
...at Function.proto.myproject.schema.MyMessageType.deserializeBinary
error.When I run DeserializeBinary() in Java with the same Uint8Array as I received in Node, it works completely fine.
How can DeserializeBinary() fail when parsing the exact same bits? The only difference is one is being run in Java and one is being run in Node. The fact that one is viewed as signed and one is viewed as unsigned shouldn't change anything right?
Obviously DeserializeBinary() won't accept it if I just pass in the Int8Array.
**Additional context: **
Also, with some tweaks in Node I get
AssertionError: Failure: Decoder hit an error
error instead of the generic one. Not sure if that is significant. I just don't useBuffer.concat()
before passing to DeserializeBinary().When creating/sending the Proto message from Objective-C, the ArrayBuffer is sent as unsigned.
Running DeserializeBinary() in Node on this ArrayBuffer gives no errors and works perfectly.
The only issue is when sending from Java to NodeJS, and the only difference between that and the Objective-C scenario is that the bits are viewed in different ways. But the actual bits are not different.
The text was updated successfully, but these errors were encountered: