ts-proto
ts-proto copied to clipboard
Using encode method on browser and node gives diff outputs for same data.

Additional 1*1 on browser but not on node.
@stephenh when we are using Example.encode(data).finish() on the browser or inside our library there is some extra encoding as compared to when we ran the same function inside a react component or on server. We are not able to find the root cause of the issue.
@ajayjaggi97 hrm, yeah, I don't have any ideas; in theory the ts-proto code is exactly the same in both, so it'd probably be differences in the underlying protobuf-js/minimal code that ts-proto calls...
This does not explain the different data, but there is a Buffer vs. Uint8Array issue in the underlying encoder (https://github.com/stephenh/ts-proto/issues/425).
Can you add more info? Like the code you call to get there, the data you put in, the hex output of the binary to copy into some proto debugger tool.