earendil-works/pi · error · ProtocolValidationError
Invalid ${this.kind} protocol framing: ${boundedErrorMessage
Error message
Invalid ${this.kind} protocol framing: ${boundedErrorMessage(error)} What it means
Error "Invalid ${this.kind} protocol framing: ${boundedErrorMessage(error)}" thrown in earendil-works/pi.
Source
Thrown at packages/protocol/src/codec.ts:123
const messages: T[] = [];
for (const frame of this.frames.push(chunk)) {
messages.push(this.parse(decodeCbor(frame, { maxByteLength: this.maxFrameLength })));
}
return messages;
} catch (error) {
this.failed = true;
if (error instanceof ProtocolValidationError) throw error;
throw new ProtocolValidationError(`Invalid ${this.kind} protocol frame: ${boundedErrorMessage(error)}`);
}
}
end(): void {
if (this.failed) throw new ProtocolValidationError(`${this.kind} message decoder has failed`);
try {
this.frames.end();
} catch (error) {
this.failed = true;
throw new ProtocolValidationError(`Invalid ${this.kind} protocol framing: ${boundedErrorMessage(error)}`);
}
}
}
/** Incrementally decodes and validates framed client messages. */
export class ClientMessageDecoder {
private readonly decoder: ValidatedMessageDecoder<ClientMessage>;
constructor(options?: FrameDecoderOptions) {
this.decoder = new ValidatedMessageDecoder("client", parseClientMessage, options);
}
push(chunk: Uint8Array): ClientMessage[] {
return this.decoder.push(chunk);
}
end(): void {
this.decoder.end();View on GitHub (pinned to 4af9d21d3b)
Solutions
- The framing was invalid; check for a corrupted transport or mismatched maxFrameLength between peers.
When it happens
Trigger: Thrown at packages/protocol/src/codec.ts:123 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24).
Data as JSON: /api/errors/80c834ce4eeebd3e.
Report an issue: GitHub.