Pumpkin-MC/Pumpkin · error · LoaderError
Invalid loader data
Error message
Invalid loader data
What it means
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.
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
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
// validate loader data shape before constructing the loader assert!(!loader_data.is_empty(), "loader data must not be empty");
Type guard
null
Try / catch
match Loader::from_data(data) {
Err(LoaderError::InvalidLoaderData) => eprintln!("bad loader data; regenerate with official tooling"),
Ok(l) => l,
Err(e) => return Err(e),
} Prevention
- Generate loader data with official build/packaging tools only
- Don't hand-edit serialized loader blobs
- Validate loader config files after every manual change
When it happens
Trigger: Raised when constructing or configuring a loader with data that fails validation (wrong format, missing required parts, wrong type).
Common situations: Server/plugin configuration pointing a loader at wrong or corrupted data; hand-edited loader configuration; a plugin packaging tool producing a non-conforming archive.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Failed to load library
- Missing plugin metadata
- Missing plugin entrypoint
- Plugin initialization failed
- Runtime error
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/c1913225997b9d5d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin/src/plugin/loader/mod.rs:54
/// Unified loader error type
#[derive(Error, Debug)]
pub enum LoaderError {
#[error("Failed to load library: {0}")]
LibraryLoad(String),
#[error("Missing plugin metadata")]
MetadataMissing,
#[error("Missing plugin entrypoint")]
EntrypointMissing,
#[error("Plugin initialization failed: {0}")]
InitializationFailed(String),
#[error("Runtime error: {0}")]
RuntimeError(String),
#[error("Invalid loader data")]
InvalidLoaderData,
#[error(
"Plugin was built for an incompatible API version. Please rebuild it against this Pumpkin build."
)]
ApiVersionMissing,
#[error(
"Plugin API version mismatch (plugin {plugin_version}, server {server_version}). Please rebuild it against this Pumpkin build."
)]
ApiVersionMismatch {
plugin_version: u32,
server_version: u32,
},
#[error("Wasm plugin initialization error: {0}")]
WasmInitializationError(#[from] PluginInitError),
}View on GitHub (pinned to 8d4639e25a)