{"record":{"id":"4e126718e1e27c12","repo":"Pumpkin-MC/Pumpkin","slug":"failed-to-read-address-4e1267","errorCode":null,"errorMessage":"Failed to read address","messagePattern":"Failed to read address","errorType":"error_code","errorClass":"VineError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/proxy/vine.rs","lineNumber":46,"sourceCode":"    #[error(\"Vine response data too short (minimum 89 bytes)\")]\n    DataTooShort,\n    #[error(\"No public key or secret configured for Vine proxy\")]\n    MissingKeyConfig,\n    #[error(\"Invalid Ed25519 public key\")]\n    InvalidPublicKey,\n    #[error(\"Failed to verify Ed25519 signature\")]\n    InvalidSignature,\n    #[error(\"Failed to read forward version\")]\n    FailedReadForwardVersion,\n    #[error(\"Unsupported forwarding version {0}. Expected {1}\")]\n    UnsupportedForwardVersion(i32, i32),\n    #[error(\"Vine timestamp expired or desynchronized: skew of {0}s exceeds limit of {1}s\")]\n    TimestampExpired(i64, i64),\n    #[error(\"Vine challenge nonce mismatch\")]\n    ChallengeMismatch,\n    #[error(\"Missing expected challenge from pending connection\")]\n    MissingChallenge,\n    #[error(\"Failed to read address\")]\n    FailedReadAddress,\n    #[error(\"Failed to parse address\")]\n    FailedParseAddress,\n    #[error(\"Failed to read game profile name\")]\n    FailedReadProfileName,\n    #[error(\"Failed to read game profile UUID\")]\n    FailedReadProfileUUID,\n    #[error(\"Failed to read game profile properties\")]\n    FailedReadProfileProperties,\n}\n\n/// Initiates Vine modern forwarding handshake by sending a `CLoginPluginRequest`\n/// with a unique 16-byte challenge nonce to protect against replay attacks.\npub async fn vine_login(connection: &mut PendingConnection) {\n    let message_id: i32 = rand::random();\n    let challenge: [u8; 16] = rand::random();\n\n    let mut buf = BytesMut::with_capacity(17);","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/proxy/vine.rs#L28-L64","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Confirm the proxy writes the address as a VarInt-length-prefixed string (e.g. \"203.0.113.7\") at that payload position","Update proxy and server to matching Vine protocol versions","Log the raw payload after nonce verification to inspect the unexpected address encoding"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// ensure enough bytes remain after the nonce for at least a minimal length-prefixed string\nfn has_address_string(payload: &[u8]) -> bool {\n    !payload.is_empty() && (payload[0] as usize) <= payload.len().saturating_sub(1)\n}","typeGuard":null,"tryCatchPattern":"match receive_vine_plugin_response(port, &config, response, challenge) {\n    Err(VineError::FailedReadAddress) => {\n        tracing::warn!(\"Could not read client IP from Vine payload; proxy payload layout mismatch\");\n        disconnect(DisconnectReason::InvalidForwarding);\n    }\n    result => result?,\n}","preventionTips":["Confirm the proxy writes the IP as a VarInt-length-prefixed string at the expected offset","Keep proxy and server on the same Vine protocol version so field order/encoding matches","Integration-test the full handshake between your exact proxy and server versions before deploying","Enable debug logging of payload contents to quickly spot address-encoding differences"],"tags":["packet-parsing","protocol-mismatch","minecraft","network"],"backgroundTag":"unexpected-response-shape","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}