{"record":{"id":"95c0d12ea438d8da","repo":"Pumpkin-MC/Pumpkin","slug":"failed-to-read-forward-version","errorCode":null,"errorMessage":"Failed to read forward version","messagePattern":"Failed to read forward version","errorType":"error_code","errorClass":"VelocityError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/proxy/velocity.rs","lineNumber":35,"sourceCode":"    net::{IpAddr, SocketAddr},\n};\nuse thiserror::Error;\nuse tracing::debug;\n\nuse crate::net::{GameProfile, java::pending::PendingConnection};\n\ntype HmacSha256 = Hmac<Sha256>;\n\nconst MAX_SUPPORTED_FORWARDING_VERSION: u8 = 4;\nconst PLAYER_INFO_CHANNEL: &str = \"velocity:player_info\";\n\n#[derive(Error, Debug)]\npub enum VelocityError {\n    #[error(\"No response data received\")]\n    NoData,\n    #[error(\"Unable to verify player details\")]\n    FailedVerifyIntegrity,\n    #[error(\"Failed to read forward version\")]\n    FailedReadForwardVersion,\n    #[error(\"Unsupported forwarding version {0}. Maximum supported version is {1}\")]\n    UnsupportedForwardVersion(u8, u8),\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\npub async fn velocity_login(connection: &mut PendingConnection) {\n    // TODO: Validate the packet transaction id from the plugin response with this\n    let velocity_message_id: i32 = rand::rng().random();","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/proxy/velocity.rs#L17-L53","documentation":"VelocityError sentinel while parsing the modern forwarding payload: the first byte(s) of the forwarded data, which encode the forwarding protocol version, could not be read. Fires when the Velocity proxy response is truncated before the version field — usually a proxy/server version mismatch or a non-Velocity client hitting the forwarding check.","triggerScenarios":"Thrown at crates/pumpkin/src/net/proxy/velocity.rs:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject the connection","Verify the proxy sends complete velocity:player_info payloads","Log the short read at debug level"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}