Pumpkin-MC/Pumpkin · error · PluginInitError
Calling `get_metadata` failed
Error message
Calling `get_metadata` failed: {0} What it means
`CallGetMetadataFailed` wraps a wasmtime::Error raised when the host calls the plugin's exported `get_metadata` function to read the plugin's name/version during loading. The call trapped or returned an error instead of valid metadata.
Solutions
- Rebuild the plugin with the current pumpkin-plugin SDK so get_metadata matches the host world
- Check the wrapped wasmtime::Error for a missing export or signature mismatch
- Validate the plugin component with `wasm-tools validate`
- Verify plugin file integrity (re-download/rebuild)
Defensive patterns
Strategy: try-catch
Type guard
fn metadata_failure(e: &PluginError) -> Option<&wasmtime::Error> { if let PluginError::CallGetMetadataFailed(e) = e { Some(e) } else { None } } Try / catch
match result { Err(PluginError::CallGetMetadataFailed(e)) => { log::warn!("skipping plugin, get_metadata failed: {e}"); None }, other => other.ok() } Prevention
- Regenerate plugin bindings whenever the WIT world changes
- Verify get_metadata export exists and matches the host signature
- Sanity-test metadata extraction at plugin build time
When it happens
Trigger: Invoking `get_metadata` on a freshly instantiated plugin component whose exported function traps or returns Err.
Common situations: Plugin built for an older WIT world where get_metadata has a different signature; plugin panics inside get_metadata; corrupted/mismatched component binary.
Related errors
- Calling `init_plugin` failed
- Engine creation failed
- failed to add player resource
- Failed to instantiate plugin
- Failed to load plugin as component
AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09).
Data as JSON: /api/errors/419a07e5be3f894b.
Report an issue: GitHub.
Appendix: source
Thrown at crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs:41
#[error("Engine creation failed: {0}")]
EngineCreationFailed(wasmtime::Error),
#[error("Failed to setup linker: {0}")]
LinkerSetupFailed(wasmtime::Error),
#[error("Plugin is built against a different API version: {0}")]
ApiVersionMismatch(wasmtime::Error),
#[error("Failed to read plugin file: {0}")]
FileReadFailed(std::io::Error),
#[error("Failed to load plugin as component: {0}")]
ComponentNewFailed(wasmtime::Error),
#[error("Failed to create cache data for plugin: {0}")]
ComponentCacheSerializeFailed(wasmtime::Error),
#[error("Failed to write cache file for plugin: {0}")]
ComponentCacheWriteFailed(std::io::Error),
#[error("Failed to instantiate plugin: {0}")]
InstantiationFailed(wasmtime::Error),
#[error("Calling `init_plugin` failed: {0}")]
CallInitPluginFailed(wasmtime::Error),
#[error("Calling `get_metadata` failed: {0}")]
CallGetMetadataFailed(wasmtime::Error),
#[error("Failed to get absolute path: {0}")]
PathResolutionFailed(std::io::Error),
#[error("Failed to create cache: {0}")]
CacheCreationFailed(wasmtime::Error),
}
#[derive(Clone, Copy, Default)]
struct SocketPolicy {
tcp_connect: bool,
tcp_bind: bool,
udp_send: bool,
udp_receive: bool,
udp_bind: bool,
loopback_only: bool,
}
impl SocketPolicy {View on GitHub (pinned to 8d4639e25a)