{"record":{"id":"3193d3faf46b301a","repo":"zellij-org/zellij","slug":"failed-to-serialize-pane-scrollback-response","errorCode":null,"errorMessage":"Failed to serialize pane scrollback response: {}","messagePattern":"Failed to serialize pane scrollback response: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"zellij-server/src/plugins/zellij_exports.rs","lineNumber":4190,"sourceCode":"                pane_id\n            ))\n        },\n        Err(RecvTimeoutError::Disconnected) => {\n            log::error!(\n                \"GetPaneScrollback channel disconnected for plugin {} requesting pane {:?}\",\n                env.plugin_id,\n                pane_id\n            );\n            PaneScrollbackResponse::Err(format!(\n                \"Channel disconnected while retrieving scrollback for pane {:?}\",\n                pane_id\n            ))\n        },\n    };\n\n    // Convert to protobuf and write back to plugin\n    ProtobufPaneScrollbackResponse::try_from(response)\n        .map_err(|e| anyhow!(\"Failed to serialize pane scrollback response: {}\", e))\n        .and_then(|serialized| {\n            wasi_write_object(env, &serialized.encode_to_vec())?;\n            Ok(())\n        })\n        .with_context(err_context)\n        .non_fatal();\n}\n\nfn write_to_pane_id(env: &PluginEnv, bytes: Vec<u8>, pane_id: PaneId) {\n    let (completion_tx, completion_rx) = oneshot::channel();\n    let send_result = env.senders.send_to_screen(ScreenInstruction::WriteToPaneId(\n        bytes,\n        pane_id,\n        Some(NotificationEnd::new(completion_tx)),\n    ));\n    if send_result.is_ok() {\n        let wait_forever = false;\n        let _ = wait_for_action_completion(completion_rx, \"write_to_pane_id\", wait_forever);","sourceCodeStart":4172,"sourceCodeEnd":4208,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-server/src/plugins/zellij_exports.rs#L4172-L4208","documentation":"After retrieving pane scrollback (via a oneshot to the screen thread), the response is converted to ProtobufPaneScrollbackResponse and written to the plugin's WASI channel. This non-fatal error means that conversion failed, so the plugin never receives the scrollback payload — it typically indicates an internal proto/struct mismatch rather than bad user input.","triggerScenarios":"The retrieved response (Ok(scrollback lines) or Err(message)) fails TryInto<ProtobufPaneScrollbackResponse> — e.g. after version drift between the server structs and generated protobuf types.","commonSituations":"Partial rebuild or mixed-version install where protobuf codegen is stale; scrollback content that the proto conversion cannot represent.","solutions":["Clean-rebuild/reinstall zellij so the generated protobuf types match the server code","Check the logged {} detail for which field failed","Retry after clearing unusually large/old scrollback (e.g. clear pane history) if content size is implicated","Report upstream with the payload detail if it reproduces on a stock build"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"ProtobufPaneScrollbackResponse::try_from(response)\n    .map_err(|e| anyhow!(\"Failed to serialize pane scrollback response: {e}\"))\n    .and_then(|s| wasi_write_object(env, &s.encode_to_vec()).map_err(Into::into))\n    .with_context(err_context)\n    .non_fatal();","preventionTips":["Clean-rebuild zellij after upgrades so protobuf codegen matches server structs","Clear very large scrollback buffers if the failure correlates with huge panes"],"tags":["protobuf","scrollback","plugin","non-fatal"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}