{"record":{"id":"a3f5e172bd97def3","repo":"Pumpkin-MC/Pumpkin","slug":"plugin-api-version-mismatch-plugin-plugin-versio","errorCode":null,"errorMessage":"Plugin API version mismatch (plugin {plugin_version}, server {server_version}). Please rebuild it against this Pumpkin build.","messagePattern":"Plugin API version mismatch \\(plugin (.+?), server (.+?)\\)\\. Please rebuild it against this Pumpkin build\\.","errorType":"error_code","errorClass":"LoaderError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/plugin/loader/mod.rs","lineNumber":62,"sourceCode":"\n    #[error(\"Missing plugin entrypoint\")]\n    EntrypointMissing,\n\n    #[error(\"Plugin initialization failed: {0}\")]\n    InitializationFailed(String),\n\n    #[error(\"Runtime error: {0}\")]\n    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":44,"sourceCodeEnd":73,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/loader/mod.rs#L44-L73","documentation":"This is `PluginLoadError::ApiVersionMismatch { plugin_version, server_version }`. The plugin DID export an API version, but the number does not equal the server's API version, so Pumpkin refuses to load it to avoid ABI/interface incompatibilities. The message interpolates both versions so you can see which side is stale.","triggerScenarios":"Calling the plugin loader with a `.wasm` component whose exported plugin API version differs from the running server's `PLUGIN_API_VERSION` — checked during metadata loading in `crates/pumpkin/src/plugin/loader/mod.rs`.","commonSituations":"Server updated to a new Pumpkin build while the plugin binary is from an older release; plugin built with a newer SDK than the pinned server; mixed plugin repo versions after a version bump PR.","solutions":["Compare the reported plugin_version vs server_version and rebuild the plugin against the server's API version","Or update the Pumpkin server to a build matching the plugin's API version","Pin plugin and server to the same release train in CI so they are always built together","Check the plugin's release notes for a build matching your server version"],"exampleFix":"// server reports: plugin 3, server 4\n// before: plugin built with pumpkin-plugin 0.2 (api 3)\n// after: bump and rebuild\n// Cargo.toml: pumpkin-plugin = \"=0.3.0\" # api 4, matching server","handlingStrategy":"validation","validationCode":"// check plugin version metadata before load\nassert_eq!(plugin.api_version, server.api_version, \"rebuild plugin for api {}\", server.api_version);","typeGuard":"fn versions_match(p: &PluginMetadata, s: &ServerInfo) -> bool { p.api_version == s.api_version }","tryCatchPattern":"match loader.load(path) {\n    Err(PluginLoadError::ApiVersionMismatch { plugin_version, server_version }) => {\n        eprintln!(\"plugin api {plugin_version} != server api {server_version}; rebuild plugin\");\n    }\n    other => other,\n}","preventionTips":["Pin pumpkin-plugin and the server to the same release in CI","Rebuild plugins whenever the server's API version bumps","Record plugin API version in your deployment manifest and validate before deploy"],"tags":["plugin","wasm","version-mismatch","loader"],"backgroundTag":"incompatible-source-type","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"}