Closed dnovak270 closed 1 year ago
This is working as intended: a string argument is intended to be used for base64 strings. Unfortunately, there's nothing in the setter API to signal as much, so the error only pops up during serialization:
Depending on your use case, you may just want to use a Uint8Array instead.
Create simple proto file:
Generate code using buf:
Try setting a non base64 char (e.g. @) to test_bytes_field and use serializeBinary method on generated jspb.Message:
Results in an error "Unknown base64 encoding at char: @"