Pumpkin-MC/Pumpkin · error · VineError

Failed to read address

Error message

Failed to read address

What it means

VineError::FailedReadAddress is returned when the client IP string cannot be read from the Vine payload after version, timestamp, and nonce checks succeeded (vine.rs:205-208). The payload.get_str() call failed, meaning the remaining bytes do not contain a valid length-prefixed string where the address should be. The server aborts rather than guessing the client's address.

Solutions

  1. Confirm the proxy writes the address as a VarInt-length-prefixed string (e.g. "203.0.113.7") at that payload position
  2. Update proxy and server to matching Vine protocol versions
  3. Log the raw payload after nonce verification to inspect the unexpected address encoding
Defensive patterns

Strategy: validation

Validate before calling

// ensure enough bytes remain after the nonce for at least a minimal length-prefixed string
fn has_address_string(payload: &[u8]) -> bool {
    !payload.is_empty() && (payload[0] as usize) <= payload.len().saturating_sub(1)
}

Try / catch

match receive_vine_plugin_response(port, &config, response, challenge) {
    Err(VineError::FailedReadAddress) => {
        tracing::warn!("Could not read client IP from Vine payload; proxy payload layout mismatch");
        disconnect(DisconnectReason::InvalidForwarding);
    }
    result => result?,
}

Prevention

When it happens

Trigger: payload.get_str() errors in receive_vine_plugin_response because the bytes after the 16-byte nonce are not a valid VarInt-length-prefixed UTF-8 string — truncated payload or an incompatible proxy writing the address in a different format (e.g. raw bytes or hostname).

Common situations: A proxy implementation writes the real IP differently (raw 4/16 bytes instead of a string, or includes a port); a truncated payload survived earlier length checks; version-skew between proxy and server payload layouts.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/4e126718e1e27c12. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin/src/net/proxy/vine.rs:46

    #[error("Vine response data too short (minimum 89 bytes)")]
    DataTooShort,
    #[error("No public key or secret configured for Vine proxy")]
    MissingKeyConfig,
    #[error("Invalid Ed25519 public key")]
    InvalidPublicKey,
    #[error("Failed to verify Ed25519 signature")]
    InvalidSignature,
    #[error("Failed to read forward version")]
    FailedReadForwardVersion,
    #[error("Unsupported forwarding version {0}. Expected {1}")]
    UnsupportedForwardVersion(i32, i32),
    #[error("Vine timestamp expired or desynchronized: skew of {0}s exceeds limit of {1}s")]
    TimestampExpired(i64, i64),
    #[error("Vine challenge nonce mismatch")]
    ChallengeMismatch,
    #[error("Missing expected challenge from pending connection")]
    MissingChallenge,
    #[error("Failed to read address")]
    FailedReadAddress,
    #[error("Failed to parse address")]
    FailedParseAddress,
    #[error("Failed to read game profile name")]
    FailedReadProfileName,
    #[error("Failed to read game profile UUID")]
    FailedReadProfileUUID,
    #[error("Failed to read game profile properties")]
    FailedReadProfileProperties,
}

/// Initiates Vine modern forwarding handshake by sending a `CLoginPluginRequest`
/// with a unique 16-byte challenge nonce to protect against replay attacks.
pub async fn vine_login(connection: &mut PendingConnection) {
    let message_id: i32 = rand::random();
    let challenge: [u8; 16] = rand::random();

    let mut buf = BytesMut::with_capacity(17);

View on GitHub (pinned to 8d4639e25a)