zellij-org/zellij · error · anyhow::Error

Missing key

Error message

Missing key

What it means

Error "Missing key" thrown in zellij-org/zellij.

Source

Thrown at zellij-utils/src/ipc/protobuf_conversion.rs:281

                Ok(ClientToServerMsg::AttachWatcherClient {
                    terminal_size: attach_watcher
                        .terminal_size
                        .ok_or_else(|| anyhow::anyhow!("Missing terminal_size"))?
                        .try_into()?,
                    is_web_client: attach_watcher.is_web_client,
                })
            },
            Some(client_to_server_msg::Message::Action(action)) => Ok(ClientToServerMsg::Action {
                action: action
                    .action
                    .ok_or_else(|| anyhow!("Missing action"))?
                    .try_into()?,
                terminal_id: action.terminal_id,
                client_id: action.client_id.map(|id| id as u16),
                is_cli_client: action.is_cli_client,
            }),
            Some(client_to_server_msg::Message::Key(key)) => Ok(ClientToServerMsg::Key {
                key: key.key.ok_or_else(|| anyhow!("Missing key"))?.try_into()?,
                raw_bytes: key.raw_bytes.into_iter().map(|b| b as u8).collect(),
                is_kitty_keyboard_protocol: key.is_kitty_keyboard_protocol,
            }),
            Some(client_to_server_msg::Message::ClientExited(_)) => {
                Ok(ClientToServerMsg::ClientExited)
            },
            Some(client_to_server_msg::Message::KillSession(_)) => {
                Ok(ClientToServerMsg::KillSession)
            },
            Some(client_to_server_msg::Message::ConnStatus(_)) => Ok(ClientToServerMsg::ConnStatus),
            Some(client_to_server_msg::Message::WebServerStarted(web_server)) => {
                Ok(ClientToServerMsg::WebServerStarted {
                    base_url: web_server.base_url,
                })
            },
            Some(client_to_server_msg::Message::FailedToStartWebServer(failed)) => {
                Ok(ClientToServerMsg::FailedToStartWebServer {
                    error: failed.error,

View on GitHub (pinned to e839bfffa5)

Solutions

  1. Include the required 'key' field in the protobuf message before sending it.
  2. Verify the sender populates all mandatory fields; add a presence check before conversion.

When it happens

Trigger: Occurs when a protobuf message received over IPC omits the required field; deserialization fails instead of using a default.

Common situations: Occurs when a client or plugin sends an incompletely populated message, often from a version mismatch or hand-crafted payload.


AI-assisted analysis of zellij-org/zellij@e839bfffa5 (2026-08-19). Data as JSON: /api/errors/4c2c3aa9a31b19d0. Report an issue: GitHub.