{"record":{"id":"96d2b1cad921ea3c","repo":"zellij-org/zellij","slug":"missing-new-size","errorCode":null,"errorMessage":"Missing new_size","messagePattern":"Missing new_size","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"zellij-utils/src/ipc/protobuf_conversion.rs","lineNumber":238,"sourceCode":"            Some(client_to_server_msg::Message::ForegroundColor(fg_color)) => {\n                Ok(ClientToServerMsg::ForegroundColor {\n                    color: fg_color.color,\n                })\n            },\n            Some(client_to_server_msg::Message::ColorRegisters(color_regs)) => {\n                Ok(ClientToServerMsg::ColorRegisters {\n                    color_registers: color_regs\n                        .color_registers\n                        .into_iter()\n                        .map(|cr| cr.try_into())\n                        .collect::<Result<Vec<_>>>()?,\n                })\n            },\n            Some(client_to_server_msg::Message::TerminalResize(resize)) => {\n                Ok(ClientToServerMsg::TerminalResize {\n                    new_size: resize\n                        .new_size\n                        .ok_or_else(|| anyhow!(\"Missing new_size\"))?\n                        .try_into()?,\n                })\n            },\n            Some(client_to_server_msg::Message::FirstClientConnected(first_client)) => {\n                Ok(ClientToServerMsg::FirstClientConnected {\n                    cli_assets: first_client\n                        .cli_assets\n                        .ok_or_else(|| anyhow!(\"Missing cli_assets\"))?\n                        .try_into()?,\n                    is_web_client: first_client.is_web_client,\n                })\n            },\n            Some(client_to_server_msg::Message::AttachClient(attach)) => {\n                Ok(ClientToServerMsg::AttachClient {\n                    cli_assets: attach\n                        .cli_assets\n                        .ok_or_else(|| anyhow!(\"Missing cli_assets\"))?\n                        .try_into()?,","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/zellij-org/zellij/blob/e839bfffa586992364309a685b2c71f3b23c247e/zellij-utils/src/ipc/protobuf_conversion.rs#L220-L256","documentation":"Thrown while converting a ClientToServerMsg::TerminalResize frame (zellij-utils/src/ipc/protobuf_conversion.rs): the TerminalResize wrapper arrived but its nested new_size field (the dimensions tuple) was None. Like [78], a singular message-typed proto field has no default instance, so an unset new_size cannot be converted and the error names the missing field.","triggerScenarios":"A client emits the TerminalResize oneof variant without filling new_size — handcrafted IPC clients, downgrade/skew where the field is dropped, or default-constructed test messages passed to TryFrom<ClientToServerMsg>.","commonSituations":"Custom clients learning the resize message shape; older clients against newer servers; integration tests with Default::default() frames.","solutions":["Set new_size (columns/rows) whenever sending TerminalResize; it is the entire payload of that variant.","Keep client and server zellij versions aligned so field semantics match.","Validate inbound frames (new_size.is_some()) and ignore/log malformed ones instead of failing the whole conversion loop."],"exampleFix":"// before\nlet msg = client_to_server_msg::Message::TerminalResize(TerminalResize::default());\n\n// after\nlet msg = client_to_server_msg::Message::TerminalResize(TerminalResize {\n    new_size: Some(Resize { columns: 120, rows: 40 }),\n});","handlingStrategy":"validation","validationCode":"// receiver side: reject resize frames without a size\nlet Some(new_size) = resize.new_size else {\n    log::warn!(\"TerminalResize without new_size; ignored\");\n    return Ok(None);\n};","typeGuard":"fn has_new_size(m: &TerminalResize) -> bool {\n    m.new_size.is_some()\n}","tryCatchPattern":"match ClientToServerMsg::try_from(proto_msg) {\n    Ok(msg) => Some(msg),\n    Err(e) if e.to_string().contains(\"Missing new_size\") => {\n        log::warn!(\"peer sent resize frame without size; frame ignored\");\n        None\n    },\n    Err(e) => return Err(e),\n}","preventionTips":["new_size is the whole payload of TerminalResize — make it mandatory in your client's send helper (assert at construction).","Keep client and server releases aligned; test round-trips of every oneof variant you emit.","Validate oneof members for required nested fields at the boundary instead of deep in conversion."],"tags":["zellij","rust","protobuf","ipc","missing-field","resize"],"backgroundTag":"missing-required-proto-field","analyzedSha":"e839bfffa586992364309a685b2c71f3b23c247e","analyzedAt":"2026-08-19T07:42:58.758Z","contentChangedAt":"2026-08-19T07:42:58.758Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}