Pumpkin-MC/Pumpkin · error · ManagerError
Loader error
Error message
Loader error: {0} What it means
ManagerError::LoaderError(#[from] LoaderError) wraps a lower-level plugin LoaderError inside the plugin manager's error enum, displayed as "Loader error: {0}". It surfaces when a load/unload operation fails inside the plugin loader itself (e.g. jar reading, WASM instantiation, manifest parsing) rather than in manager bookkeeping. Use its source to see the underlying loader failure.
Solutions
- Read the wrapped LoaderError message for the concrete cause (IO, instantiation, or metadata failure)
- Rebuild/re-download the plugin for the running server's plugin API version
- Validate the plugin file (correct jar/wasm, intact manifest) before loading
- Test the plugin standalone or update the server if the plugin requires a newer loader
Defensive patterns
Strategy: try-catch
Validate before calling
// verify plugin file before load attempt
let path = Path::new(&plugin_path);
if !path.is_file() || MetadataExt::size(&path.metadata()?) == 0 {
return Err("plugin file missing or empty".into());
} Try / catch
match manager.load_plugin(path) {
Err(ManagerError::LoaderError(e)) => {
error!("loader failure for {path}: {e}");
// inspect e (and its source chain) for the concrete cause
}
other => other?,
} Prevention
- Download plugins from trusted sources and verify integrity
- Match plugin builds to the server's plugin API version
- Validate plugin metadata/manifest before shipping
- Test plugin loading in a staging server
When it happens
Trigger: Loading a plugin whose file is corrupt, whose WASM module fails to instantiate, or whose plugin metadata/manifest is invalid; the manager propagates the loader's error via the #[from] conversion.
Common situations: Dropping an incompatible or corrupted plugin file into the plugins folder; plugin compiled against a different plugin API/WIT version than the server supports; malformed plugin metadata in the jar.
Related errors
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/304a915cb7925833.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin/src/plugin/mod.rs:221
///
/// OS specific issues
/// - Windows: Plugin cannot be unloaded, it can be only active or not
struct LoadedPlugin {
metadata: PluginMetadata,
instance: Option<Arc<dyn Plugin>>,
loader: Arc<dyn PluginLoader>,
loader_data: Option<Box<dyn Any + Send + Sync>>,
is_active: bool,
context: Arc<Context>,
path: PathBuf,
}
/// Error types for plugin management
#[derive(Error, Debug)]
pub enum ManagerError {
#[error("Plugin not found: {0}")]
PluginNotFound(String),
#[error("Loader error: {0}")]
LoaderError(#[from] LoaderError),
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("Dependency error: {0}")]
DependencyError(String),
}
impl Default for PluginManager {
fn default() -> Self {
Self::new(true)
}
}
impl PluginManager {
/// Create a new plugin manager with default loaders
#[must_use]
pub fn new(verify_plugin_signatures: bool) -> Self {
Self {View on GitHub (pinned to 8d4639e25a)