zellij-org/zellij · error · anyhow::Error
Invalid OnForceClose value: {}
Error message
Invalid OnForceClose value: {} What it means
Error "Invalid OnForceClose value: {}" thrown in zellij-org/zellij.
Source
Thrown at zellij-utils/src/ipc/protobuf_conversion.rs:1055
layout_dir: options.layout_dir.map(std::path::PathBuf::from),
theme_dir: options.theme_dir.map(std::path::PathBuf::from),
mouse_mode: options.mouse_mode,
pane_frames: options.pane_frames,
pane_frame_style: options.pane_frame_style.as_deref().and_then(|s| match s {
"full" => Some(crate::input::options::PaneFrameStyle::Full),
"titles" => Some(crate::input::options::PaneFrameStyle::Titles),
"none" => Some(crate::input::options::PaneFrameStyle::None),
_ => None,
}),
mirror_session: options.mirror_session,
on_force_close: options
.on_force_close
.map(|o| match ProtoOnForceClose::try_from(o).ok() {
Some(ProtoOnForceClose::Quit) => Ok(crate::input::options::OnForceClose::Quit),
Some(ProtoOnForceClose::Detach) => {
Ok(crate::input::options::OnForceClose::Detach)
},
_ => Err(anyhow!("Invalid OnForceClose value: {}", o)),
})
.transpose()?,
scroll_buffer_size: options.scroll_buffer_size.map(|s| s as usize),
copy_command: options.copy_command,
copy_clipboard: options
.copy_clipboard
.map(|c| match ProtoClipboard::try_from(c).ok() {
Some(ProtoClipboard::System) => Ok(crate::input::options::Clipboard::System),
Some(ProtoClipboard::Primary) => Ok(crate::input::options::Clipboard::Primary),
_ => Err(anyhow!("Invalid Clipboard value: {}", c)),
})
.transpose()?,
copy_on_select: options.copy_on_select,
osc8_hyperlinks: options.osc8_hyperlinks,
scrollback_editor: options.scrollback_editor.map(std::path::PathBuf::from),
session_name: options.session_name,
attach_to_session: options.attach_to_session,
auto_layout: options.auto_layout,View on GitHub (pinned to e839bfffa5)
Solutions
- Validate the value against the allowed enum range before constructing the message.
- Ensure client and server use matching protobuf definitions; regenerate bindings if versions differ.
When it happens
Trigger: Occurs when a protobuf enum value received over IPC has no matching variant; conversion rejects the unknown value.
Common situations: Typical of version skew between client and server, or a malformed/corrupted IPC message.
AI-assisted analysis of zellij-org/zellij@e839bfffa5 (2026-08-19).
Data as JSON: /api/errors/34153802b7b900fd.
Report an issue: GitHub.