{"record":{"id":"31fb224fa6342e41","repo":"Pumpkin-MC/Pumpkin","slug":"unknown-itemstackrequestaction-id-action-type","errorCode":null,"errorMessage":"Unknown ItemStackRequestAction ID: {action_type}","messagePattern":"Unknown ItemStackRequestAction ID: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/pumpkin-protocol/src/bedrock/server/item_stack_request.rs","lineNumber":240,"sourceCode":"            }),\n            15 => Ok(Self::Loom {\n                pattern_id: String::read(buf)?,\n                repetitions: u8::read(buf)?,\n            }),\n            16 => Ok(Self::CraftNonImplemented),\n            17 => {\n                let result_items_len = collection_length(buf, \"craft result items\")?;\n                let mut result_items = Vec::with_capacity(result_items_len);\n                for _ in 0..result_items_len {\n                    result_items.push(StackRequestItem::read(buf)?);\n                }\n                let times_crafted = u8::read(buf)?;\n                Ok(Self::CraftResultsDeprecated {\n                    result_items,\n                    times_crafted,\n                })\n            }\n            _ => Err(Error::new(\n                ErrorKind::InvalidData,\n                format!(\"Unknown ItemStackRequestAction ID: {action_type}\"),\n            )),\n        }\n    }\n}\n\nfn skip_autocraft_ingredient<R: Read>(reader: &mut R) -> Result<(), Error> {\n    let descriptor_type = VarUInt::read(reader)?.0;\n    let _legacy_type = u8::read(reader)?;\n    match descriptor_type {\n        0 => {}\n        1 => {\n            let _identifier = String::read(reader)?;\n            let _aux = VarInt::read(reader)?;\n        }\n        2 => {\n            let _expression = String::read(reader)?;","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin-protocol/src/bedrock/server/item_stack_request.rs#L222-L258","documentation":"Thrown by ItemStackRequestAction::read when the action_type VarUInt does not match any known action discriminant (the catch-all match arm). Each action type id maps to a specific action struct; unknown ids indicate the packet no longer matches the implemented protocol. Parsing fails with an InvalidData error.","triggerScenarios":"A client sends an ItemStackRequest whose action list contains an action id not handled by this decoder (e.g. a newly added action type in a newer Bedrock protocol, or a garbage/crafted value).","commonSituations":"Server lagging behind a Minecraft Bedrock release that introduced new stack-request action types; modified clients; fuzzed packets.","solutions":["Update pumpkin-protocol to a version supporting the client's action ids","Downgrade/pin the client to a protocol version the server supports","Log the offending action_type and compare against the match arms in item_stack_request.rs to identify the missing variant","Add the new action variant to the match if you maintain a fork"],"exampleFix":"// before\n_ => Err(Error::new(ErrorKind::InvalidData, format!(\"Unknown ItemStackRequestAction ID: {action_type}\"))),\n// after (fork, adding a known new id)\n0x53 => { let a = ItemStackRequestActionData::read(buf)?; Ok(Self::SomeNewAction(a)) }\n_ => Err(Error::new(ErrorKind::InvalidData, format!(\"Unknown ItemStackRequestAction ID: {action_type}\"))),","handlingStrategy":"validation","validationCode":"fn known_action_id(id: u32) -> bool { id <= 0x52 } // adjust to the handled discriminant set","typeGuard":"fn parse_action_id(id: u32) -> Option<u8> { u8::try_from(id).ok().filter(|&i| is_handled_action(i)) }","tryCatchPattern":"match ItemStackRequestAction::read(buf) {\n    Err(e) if e.to_string().starts_with(\"Unknown ItemStackRequestAction ID\") => {\n        tracing::warn!(\"peer sent unknown action id; likely version mismatch\");\n    }\n    Err(e) => return Err(e),\n    Ok(a) => queue(a),\n}","preventionTips":["Pin the server to the client's exact Bedrock protocol version","Extend the match arms promptly when a new Minecraft release adds action types","Log the raw action_type on failure to identify missing variants"],"tags":["protocol","bedrock","deserialization","invalid-enum"],"backgroundTag":"invalid-enum-value","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"}