- Error:
SerovalMalformedBinaryTypeError - Step: none
- Fields: none. Development builds name the node type in the message.
What it means
A node is invalid. For example, it declares an id twice, refers to an id that no node declared, has an unknown constant or constructor byte, settles a promise twice, sends a stream event after the stream ended, assigns to a container after its Pending node, describes a view outside its buffer, goes over a size limit, or uses a disabled feature.
Common causes
- A typed array is longer than 1,000,000 elements, or a
DataViewis longer than 1,000,000 bytes. - The receiver disabled a feature that the sender used.
- The input was not produced by seroval, or was changed on the way.
- The input was produced by a different seroval version.
- Someone sent the input on purpose to attack the receiver.
How to fix it
- Enable the feature on the receiver if the data is expected.
- Split typed arrays and
DataViews larger than 1,000,000 elements or bytes. - Use the same seroval version on both sides.
- Check that the input reaches the receiver unchanged.
- Treat the input as untrusted and drop it. See security.