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

LayoutInfo missing layout_type

Error message

LayoutInfo missing layout_type

What it means

Error "LayoutInfo missing layout_type" thrown in zellij-org/zellij.

Solutions

  1. Include the required 'layout_type' 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/cfba611f1b88e3bb. Report an issue: GitHub.

Appendix: source

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

    fn try_from(
        layout: crate::client_server_contract::client_server_contract::LayoutInfo,
    ) -> Result<Self> {
        use crate::client_server_contract::client_server_contract::layout_info::LayoutType;
        match layout.layout_type {
            Some(LayoutType::BuiltinName(name)) => Ok(crate::data::LayoutInfo::BuiltIn(name)),
            Some(LayoutType::FilePath(path)) => {
                let layout_metadata = layout
                    .layout_metadata
                    .map(|m| m.try_into())
                    .transpose()?
                    .unwrap_or_default();
                Ok(crate::data::LayoutInfo::File(path, layout_metadata))
            },
            Some(LayoutType::Url(url)) => Ok(crate::data::LayoutInfo::Url(url)),
            Some(LayoutType::Stringified(content)) => {
                Ok(crate::data::LayoutInfo::Stringified(content))
            },
            None => Err(anyhow!("LayoutInfo missing layout_type")),
        }
    }
}

impl From<crate::data::LayoutMetadata> for ProtoLayoutMetadata {
    fn from(metadata: crate::data::LayoutMetadata) -> Self {
        ProtoLayoutMetadata {
            tabs: metadata.tabs.into_iter().map(|t| t.into()).collect(),
            creation_time: metadata.creation_time,
            update_time: metadata.update_time,
        }
    }
}

impl TryFrom<ProtoLayoutMetadata> for crate::data::LayoutMetadata {
    type Error = anyhow::Error;
    fn try_from(proto_metadata: ProtoLayoutMetadata) -> Result<Self> {
        let tabs = proto_metadata

View on GitHub (pinned to e839bfffa5)