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

failed to convert serialized command

Error message

failed to convert serialized command: {}

What it means

Error "failed to convert serialized command: {}" thrown in zellij-org/zellij.

Solutions

  1. Check the attached error for the underlying serialization failure and fix the offending data.
  2. Ensure plugin/wasm artifacts and zellij versions are compatible.

When it happens

Trigger: Occurs at zellij-server/src/plugins/zellij_exports.rs:174 when the operation fails: "failed to convert serialized command: {}". Currently there is no defensive handling preventing or contextualizing this failure before it surfaces.

Common situations: Typically version skew, corrupted data, or an unexpected payload shape.


AI-assisted analysis of zellij-org/zellij@5cb5df5cce (2026-08-19). Data as JSON: /api/errors/8fbc9a5052e02d22. Report an issue: GitHub.

Appendix: source

Thrown at zellij-server/src/plugins/zellij_exports.rs:174

    }
}

pub fn zellij_exports(linker: &mut Linker<PluginEnv>) {
    linker
        .func_wrap("zellij", "host_run_plugin_command", host_run_plugin_command)
        .unwrap();
}

fn host_run_plugin_command(mut caller: Caller<'_, PluginEnv>) {
    let mut env = caller.data_mut();
    let plugin_command = env.name();
    let err_context = || format!("failed to run plugin command {}", plugin_command);
    wasi_read_bytes(env)
        .and_then(|bytes| {
            let command: ProtobufPluginCommand = ProtobufPluginCommand::decode(bytes.as_slice())?;
            let command: PluginCommand = command
                .try_into()
                .map_err(|e| anyhow!("failed to convert serialized command: {}", e))?;
            match check_command_permission(&env, &command) {
                (PermissionStatus::Granted, _) => match command {
                    PluginCommand::Subscribe(event_list) => subscribe(env, event_list)?,
                    PluginCommand::Unsubscribe(event_list) => unsubscribe(env, event_list)?,
                    PluginCommand::SetSelectable(selectable) => set_selectable(env, selectable),
                    PluginCommand::ShowCursor(cursor_position) => show_cursor(env, cursor_position),
                    PluginCommand::GetPluginIds => get_plugin_ids(env),
                    PluginCommand::GetZellijVersion => get_zellij_version(env),
                    PluginCommand::GenerateRandomName => generate_random_name(env),
                    PluginCommand::DumpLayout(layout_name) => dump_layout(env, layout_name),
                    PluginCommand::ParseLayout(layout_string) => parse_layout(env, layout_string),
                    PluginCommand::GetLayoutDir => get_layout_dir(env),
                    PluginCommand::GetFocusedPaneInfo => get_focused_pane_info(env),
                    PluginCommand::SaveSession => save_session(env),
                    PluginCommand::CurrentSessionLastSavedTime => {
                        current_session_last_saved_time(env)
                    },
                    PluginCommand::GetPaneInfo(pane_id) => get_pane_info(env, pane_id),

View on GitHub (pinned to 5cb5df5cce)