{"record":{"id":"f718a708bdec7802","repo":"zellij-org/zellij","slug":"failed-to-serialized-plugin-ids","errorCode":null,"errorMessage":"Failed to serialized plugin ids: {}","messagePattern":"Failed to serialized plugin ids: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"zellij-server/src/plugins/zellij_exports.rs","lineNumber":941,"sourceCode":"            plugin_id: env.plugin_id,\n        });\n\n    env.senders\n        .send_to_screen(ScreenInstruction::RequestPluginPermissions(\n            env.plugin_id,\n            PluginPermission::new(env.plugin.location.to_string(), permissions),\n        ))\n}\n\nfn get_plugin_ids(env: &PluginEnv) {\n    let ids = PluginIds {\n        plugin_id: env.plugin_id,\n        zellij_pid: process::id(),\n        initial_cwd: env.plugin_cwd.clone(),\n        client_id: env.client_id,\n    };\n    ProtobufPluginIds::try_from(ids)\n        .map_err(|e| anyhow!(\"Failed to serialized plugin ids: {}\", e))\n        .and_then(|serialized| {\n            wasi_write_object(env, &serialized.encode_to_vec())?;\n            Ok(())\n        })\n        .with_context(|| {\n            format!(\n                \"failed to query plugin IDs from host for plugin {}\",\n                env.name()\n            )\n        })\n        .non_fatal();\n}\n\nfn get_zellij_version(env: &PluginEnv) {\n    let protobuf_zellij_version = ProtobufZellijVersion {\n        version: VERSION.to_owned(),\n    };\n    wasi_write_object(env, &protobuf_zellij_version.encode_to_vec())","sourceCodeStart":923,"sourceCodeEnd":959,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-server/src/plugins/zellij_exports.rs#L923-L959","documentation":"get_plugin_ids converts a small PluginIds struct (plugin_id, zellij_pid, cwd, client_id) into ProtobufPluginIds to write back to the plugin. Failure of this TryInto is an internal serialization invariant break; the error is non-fatal, so the call logs and continues but the plugin gets no ID payload on its stdin.","triggerScenarios":"Only if the PluginIds→ProtobufPluginIds conversion rejects one of its fields — e.g. a path or id representation that the proto conversion refuses. There is no user-controlled input that normally triggers it.","commonSituations":"Cross-version drift between zellij-server and generated protobuf types after a partial rebuild; exotic environments where the plugin cwd cannot be represented in the proto.","solutions":["Do a clean rebuild of zellij so protobuf types regenerate consistently","Check the logged {} detail to see which field failed","Report upstream if it reproduces on a stock build — it indicates a proto/struct mismatch"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// already non_fatal in-tree: log and continue\nProtobufPluginIds::try_from(ids).map_err(|e| anyhow!(\"Failed to serialized plugin ids: {e}\")).non_fatal();","preventionTips":["Clean rebuilds after pulling zellij updates so proto codegen stays consistent"],"tags":["plugin","protobuf","non-fatal","plugin-ids"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}