Pumpkin-MC/Pumpkin · error · EncryptionError

no encryption request is pending

Error message

no encryption request is pending

What it means

EncryptionError state guard: the client answered with an encryption response (shared secret) while no encryption request with a verify token is outstanding on this connection. Fires when a client sends an unprompted or late encryption confirmation — typically a modified client or a desynchronized login handshake.

Solutions

  1. Disconnect the client for out-of-sequence handshake
  2. Store pending verify tokens per connection and require them
  3. Log the unexpected packet
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/pumpkin/src/net/mod.rs:430 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/d9d52544f8e14cbb. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin/src/net/mod.rs:430

                    expires.format(FORMAT_DESCRIPTION).unwrap_or_default(),
                )],
            )),
            None => text,
        });
    }

    None
}

#[derive(Error, Debug)]
pub enum EncryptionError {
    #[error("failed to decrypt shared secret")]
    FailedDecrypt,
    #[error("shared secret has the wrong length")]
    SharedWrongLength,
    #[error("encryption is already enabled")]
    AlreadyEncrypted,
    #[error("no encryption request is pending")]
    NoPendingVerifyToken,
    #[error("verify token does not match")]
    VerifyTokenMismatch,
}

fn is_valid_player_name(name: &str) -> bool {
    if name.len() > 16 {
        return false;
    }
    !name.chars().any(|c| c.is_control() || c == ' ')
}

#[derive(Clone, Copy, Debug)]
pub enum DisconnectReason {
    Unknown = 0,
    CantConnectNoInternet = 1,
    NoPermissions = 2,
    UnrecoverableError = 3,

View on GitHub (pinned to 8d4639e25a)