Pumpkin-MC/Pumpkin · error · LoaderError

Missing plugin metadata

Error message

Missing plugin metadata

What it means

This is LoaderError::MetadataMissing, part of the plugin loader's unified error enum. It means the loaded plugin did not provide required plugin metadata (name, id, version, etc.), so the loader cannot register it. Metadata is mandatory to identify and manage the plugin.

Solutions

  1. Add the required plugin metadata (id/name/version) to the plugin using the current Pumpkin plugin macro or export
  2. Rebuild the plugin with the latest pumpkin-plugin API
  3. Compare against a working example plugin to see the required metadata shape
  4. Check the plugin was built from a source tree that includes the metadata module, not a partial build

Example fix

null
Defensive patterns

Strategy: validation

Validate before calling

// in the plugin crate, ensure metadata is defined
#[derive(PluginMetadata)]
#[plugin(id = "myplugin", version = "0.1.0")]
struct MyPlugin;

Type guard

null

Try / catch

match loader.load(path) {
    Err(LoaderError::MetadataMissing) => eprintln!("plugin has no metadata; rebuild with the plugin macro"),
    Ok(p) => enable(p),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Raised after the library loads but before the entrypoint runs, when the descriptor/metadata the loader extracts from the plugin is absent or empty.

Common situations: Plugin author forgot to export/fill the metadata structure; hand-built plugin crates missing the metadata macro/export; plugin built against an older loader expecting a different metadata location.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

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

    /// Load a plugin from the specified path
    fn load<'a>(&'a self, path: &'a Path) -> PluginLoadFuture<'a>;

    /// Check if this loader can handle the given file
    fn can_load(&self, path: &Path) -> bool;

    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,

View on GitHub (pinned to 8d4639e25a)