Errors & Troubleshooting
Thrown errors (configuration/format)
| Message | Cause | Fix |
|---|---|---|
Hasher <id> not registered |
Unknown custom hasher or not yet loaded | Add func/cdn, or preload with loadScriptOnce |
Hasher <id> size mismatch |
Digest length differs from declared size |
Adjust size / hasher output |
Unsupported output <fmt> |
output not in {bytes, hex, base64} |
Change output |
_ladderX: empty blocks |
Internal invariant in X-ladder violated | Treat as a caller bug; not expected in public API |
"sentinel" |
Origin header sentinels not 0x00 (corruption) |
Re-export package |
"div" |
Origin body length not divisible by N |
Re-send complete package |
"SigImporter sizes" |
Signature payload inconsistent with originSize / N |
Ensure both sides agree on originSize and N |
Raised in: "sentinel"/"div" — actions.import.origin(); "SigImporter sizes" — actions.import.signature().
verify() returns false (by design; it does not throw)
-
S-mode: gap outside
1…N−1, or blocks out of order. -
X-mode: any missing/duplicated packet (gap must be exactly
1). -
Header mismatch: mixed
mode/hash/Nbetween two signatures. -
X-mode size rule:
originSizemust equal digest length; otherwise comparison fails.
Debug tips
- Log
cfgand parsed header fields (N/mode/hash). - Start with
fmt.export = 'hex'to ease inspection. - Reduce
Nwhile prototyping; increase only after integration works.