{"record":{"id":"c1913225997b9d5d","repo":"Pumpkin-MC/Pumpkin","slug":"invalid-loader-data","errorCode":null,"errorMessage":"Invalid loader data","messagePattern":"Invalid loader data","errorType":"error_code","errorClass":"LoaderError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/loader/mod.rs","lineNumber":54,"sourceCode":"/// Unified loader error type\n#[derive(Error, Debug)]\npub enum LoaderError {\n    #[error(\"Failed to load library: {0}\")]\n    LibraryLoad(String),\n\n    #[error(\"Missing plugin metadata\")]\n    MetadataMissing,\n\n    #[error(\"Missing plugin entrypoint\")]\n    EntrypointMissing,\n\n    #[error(\"Plugin initialization failed: {0}\")]\n    InitializationFailed(String),\n\n    #[error(\"Runtime error: {0}\")]\n    RuntimeError(String),\n\n    #[error(\"Invalid loader data\")]\n    InvalidLoaderData,\n\n    #[error(\n        \"Plugin was built for an incompatible API version. Please rebuild it against this Pumpkin build.\"\n    )]\n    ApiVersionMissing,\n\n    #[error(\n        \"Plugin API version mismatch (plugin {plugin_version}, server {server_version}). Please rebuild it against this Pumpkin build.\"\n    )]\n    ApiVersionMismatch {\n        plugin_version: u32,\n        server_version: u32,\n    },\n\n    #[error(\"Wasm plugin initialization error: {0}\")]\n    WasmInitializationError(#[from] PluginInitError),\n}","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/loader/mod.rs#L36-L72","documentation":"This is LoaderError::InvalidLoaderData. It means the loader was given data it considers invalid — e.g. the loader descriptor/data blob passed when creating or configuring a loader does not match the expected format. The loader cannot proceed with malformed loader data.","triggerScenarios":"Raised when constructing or configuring a loader with data that fails validation (wrong format, missing required parts, wrong type).","commonSituations":"Server/plugin configuration pointing a loader at wrong or corrupted data; hand-edited loader configuration; a plugin packaging tool producing a non-conforming archive.","solutions":["Fix the loader configuration/data to match the documented format","Regenerate the plugin package with the official build tooling","Compare with a known-good loader configuration example","Validate any hand-edited config files for typos or missing fields"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"// validate loader data shape before constructing the loader\nassert!(!loader_data.is_empty(), \"loader data must not be empty\");","typeGuard":"null","tryCatchPattern":"match Loader::from_data(data) {\n    Err(LoaderError::InvalidLoaderData) => eprintln!(\"bad loader data; regenerate with official tooling\"),\n    Ok(l) => l,\n    Err(e) => return Err(e),\n}","preventionTips":["Generate loader data with official build/packaging tools only","Don't hand-edit serialized loader blobs","Validate loader config files after every manual change"],"tags":["plugin","loader","configuration","rust"],"backgroundTag":"invalid-config-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"}