Decoding with Decoder.read({ includeUnknownData: true }) fails with:
"Cannot read properties of undefined (reading 'components')"
Decoding stops at that point, so all remaining messages in the file are lost.
Cause is in src/decoder.js, #setAccumulatedField() (line 719 in 21.213.0):
let components = messageDefinition.fields[containingField.fieldDefinitionNumber].components ?? []
With includeUnknownData: true, fields that have no Profile entry are present in message, so this lookup returns undefined. It only triggers when the unknown field comes before an accumulated field (distance, total_cycles, accumulated_power) in the message definition — the same fields in the opposite order decode fine.
Fix is the optional chaining already used on the next lookup two lines down:
let components = messageDefinition.fields[containingField.fieldDefinitionNumber]?.components ?? []
Reproduced on 21.208.0 and 21.213.0, Node 22. Happy to post a minimal repro script if that helps.