{"record":{"id":"e544c3cf7ee44238","repo":"Pumpkin-MC/Pumpkin","slug":"wasm-plugin-initialization-error-0","errorCode":null,"errorMessage":"Wasm plugin initialization error: {0}","messagePattern":"Wasm plugin initialization error: (.+?)","errorType":"error_code","errorClass":"LoaderError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/loader/mod.rs","lineNumber":70,"sourceCode":"    RuntimeError(String),\n\n    #[error(\"Invalid loader data\")]\n    InvalidLoaderData,\n\n    #[error(\n        \"Plugin was built for an incompatible API version. Please rebuild it against this Pumpkin build.\"\n    )]\n    ApiVersionMissing,\n\n    #[error(\n        \"Plugin API version mismatch (plugin {plugin_version}, server {server_version}). Please rebuild it against this Pumpkin build.\"\n    )]\n    ApiVersionMismatch {\n        plugin_version: u32,\n        server_version: u32,\n    },\n\n    #[error(\"Wasm plugin initialization error: {0}\")]\n    WasmInitializationError(#[from] PluginInitError),\n}\n","sourceCodeStart":52,"sourceCodeEnd":73,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/loader/mod.rs#L52-L73","documentation":"This is `PluginLoadError::WasmInitializationError`, a `#[from]` wrapper around `PluginInitError`. It surfaces any failure that occurred while booting the WASM engine or initializing the plugin component (engine creation, linker setup, instantiation, init_plugin call, etc.). The inner error's message is embedded via `{0}`.","triggerScenarios":"Any `PluginInitError` raised during `WasmPluginLoader` load: wasmtime engine/linker/component failures, file IO on the plugin or cache, instantiation errors, or host-call errors (`init_plugin`, `get_metadata`).","commonSituations":"Corrupt or non-component .wasm files, missing WASI host functions, unwritable cache directory, plugin panicking inside `init_plugin`, unreadable plugin file path.","solutions":["Read the inner `{0}` message to identify which init step failed","Verify the .wasm file exists, is readable, and is a valid WASM component (wasm-tools component wit output)","Check cache directory write permissions and clear stale cache files","Rebuild the plugin and check server logs for the host function that was missing or faulted"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match loader.load(path) {\n    Err(PluginLoadError::WasmInitializationError(e)) => {\n        eprintln!(\"plugin init failed: {e}\"); // drill into the inner PluginInitError\n        // skip the plugin, keep server running\n    }\n    other => other,\n}","preventionTips":["Load each plugin independently so one failure doesn't abort startup","Log the inner error chain (wasmtime::Error) for diagnosis","Pre-validate plugin files (existence, component validity) before init"],"tags":["plugin","wasm","wasmtime","initialization"],"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-16T04:17:20.429Z"}