Pumpkin-MC/Pumpkin · error · LoaderError

Plugin initialization failed

Error message

Plugin initialization failed: {0}

What it means

This is LoaderError::InitializationFailed(String). It means the plugin's entrypoint ran but plugin initialization returned an error or panicked; the message carries the underlying cause. The loader surfaces it as a unified error so the server can report which plugin failed to start.

Solutions

  1. Read the inner message payload for the plugin's own error cause
  2. Fix the plugin's configuration/data files it complains about
  3. Update or downgrade the plugin to a version compatible with this Pumpkin build
  4. Report/inspect the plugin's init code — the failure is in the plugin, not the loader

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

null

Type guard

null

Try / catch

match loader.load(path) {
    Err(LoaderError::InitializationFailed(msg)) => eprintln!("plugin init failed: {msg}; disabling plugin"),
    Ok(p) => enable(p),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Raised when invoking the plugin entrypoint/constructor and it returns Err or otherwise fails during setup (e.g. registering commands, reading its own config, hooking APIs that are unavailable).

Common situations: Plugin's own config file missing/invalid; plugin assuming APIs or registries that don't exist in this server build; plugin dependency (e.g. another plugin or data directory) not present; version incompatibility between plugin expectations and server.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/38eecd2f64d2f5bd. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin/src/plugin/loader/mod.rs:48

    fn unload(&self, data: Box<dyn Any + Send + Sync>) -> PluginUnloadFuture<'_>;

    /// Checks if the plugin can be safely unloaded.
    fn can_unload(&self) -> bool;
}

/// 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,

View on GitHub (pinned to 8d4639e25a)