{"record":{"id":"419a07e5be3f894b","repo":"Pumpkin-MC/Pumpkin","slug":"calling-get-metadata-failed-0","errorCode":null,"errorMessage":"Calling `get_metadata` failed: {0}","messagePattern":"Calling `get_metadata` failed: (.+?)","errorType":"exception","errorClass":"PluginInitError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs","lineNumber":41,"sourceCode":"    #[error(\"Engine creation failed: {0}\")]\n    EngineCreationFailed(wasmtime::Error),\n    #[error(\"Failed to setup linker: {0}\")]\n    LinkerSetupFailed(wasmtime::Error),\n    #[error(\"Plugin is built against a different API version: {0}\")]\n    ApiVersionMismatch(wasmtime::Error),\n    #[error(\"Failed to read plugin file: {0}\")]\n    FileReadFailed(std::io::Error),\n    #[error(\"Failed to load plugin as component: {0}\")]\n    ComponentNewFailed(wasmtime::Error),\n    #[error(\"Failed to create cache data for plugin: {0}\")]\n    ComponentCacheSerializeFailed(wasmtime::Error),\n    #[error(\"Failed to write cache file for plugin: {0}\")]\n    ComponentCacheWriteFailed(std::io::Error),\n    #[error(\"Failed to instantiate plugin: {0}\")]\n    InstantiationFailed(wasmtime::Error),\n    #[error(\"Calling `init_plugin` failed: {0}\")]\n    CallInitPluginFailed(wasmtime::Error),\n    #[error(\"Calling `get_metadata` failed: {0}\")]\n    CallGetMetadataFailed(wasmtime::Error),\n    #[error(\"Failed to get absolute path: {0}\")]\n    PathResolutionFailed(std::io::Error),\n    #[error(\"Failed to create cache: {0}\")]\n    CacheCreationFailed(wasmtime::Error),\n}\n\n#[derive(Clone, Copy, Default)]\nstruct SocketPolicy {\n    tcp_connect: bool,\n    tcp_bind: bool,\n    udp_send: bool,\n    udp_receive: bool,\n    udp_bind: bool,\n    loopback_only: bool,\n}\n\nimpl SocketPolicy {","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs#L23-L59","documentation":"`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.","triggerScenarios":"Invoking `get_metadata` on a freshly instantiated plugin component whose exported function traps or returns Err.","commonSituations":"Plugin built for an older WIT world where get_metadata has a different signature; plugin panics inside get_metadata; corrupted/mismatched component binary.","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)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn metadata_failure(e: &PluginError) -> Option<&wasmtime::Error> { if let PluginError::CallGetMetadataFailed(e) = e { Some(e) } else { None } }","tryCatchPattern":"match result { Err(PluginError::CallGetMetadataFailed(e)) => { log::warn!(\"skipping plugin, get_metadata failed: {e}\"); None }, other => other.ok() }","preventionTips":["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"],"tags":["wasm","wasmtime","plugin-metadata"],"backgroundTag":"module-init-failed","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}