Pumpkin-MC/Pumpkin · error · ChatError
attempted to initialize a session with an invalid public key
Error message
attempted to initialize a session with an invalid public key
What it means
ChatError sentinel raised while initializing the chat session: the public key the client sent (with its key/payload) could not be parsed or accepted as a valid signing key. Fires at session setup when the client's key data is malformed, from an untrusted source, or does not match expectations. The faulty input is the client-provided public key blob in the chat session initialization data.
Solutions
- Kick the player with a session-invalid reason
- Verify key signature against Mojang's public key at session start
- Log the failure for diagnostics
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/pumpkin/src/net/java/play/mod.rs:140 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/ec1ec10e3c6be738.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin/src/net/java/play/mod.rs:140
}
#[derive(Debug, Error)]
pub enum ChatError {
#[error("sent an oversized message")]
OversizedMessage,
#[error("sent a message with illegal characters")]
IllegalCharacters,
#[error("sent a chat with invalid/no signature")]
UnsignedChat,
#[error("has too many unacknowledged chats queued")]
TooManyPendingChats,
#[error("sent a chat that couldn't be validated")]
ChatValidationFailed,
#[error("sent a chat with an out of order timestamp")]
OutOfOrderChat,
#[error("has an expired public key")]
ExpiredPublicKey,
#[error("attempted to initialize a session with an invalid public key")]
InvalidPublicKey,
}
impl PumpkinError for ChatError {
fn is_kick(&self) -> bool {
true
}
fn severity(&self) -> Level {
Level::WARN
}
fn client_kick_reason(&self) -> Option<String> {
match self {
Self::OversizedMessage => Some("Chat message too long".into()),
Self::IllegalCharacters => Some(
TextComponent::translate_cross(
translation::java::MULTIPLAYER_DISCONNECT_ILLEGAL_CHARACTERS,View on GitHub (pinned to 8d4639e25a)