zellij-org/zellij · warning

Failed to serialized plugin ids: {}

Error message

Failed to serialized plugin ids: {}

What it means

get_plugin_ids converts a small PluginIds struct (plugin_id, zellij_pid, cwd, client_id) into ProtobufPluginIds to write back to the plugin. Failure of this TryInto is an internal serialization invariant break; the error is non-fatal, so the call logs and continues but the plugin gets no ID payload on its stdin.

Source

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

            plugin_id: env.plugin_id,
        });

    env.senders
        .send_to_screen(ScreenInstruction::RequestPluginPermissions(
            env.plugin_id,
            PluginPermission::new(env.plugin.location.to_string(), permissions),
        ))
}

fn get_plugin_ids(env: &PluginEnv) {
    let ids = PluginIds {
        plugin_id: env.plugin_id,
        zellij_pid: process::id(),
        initial_cwd: env.plugin_cwd.clone(),
        client_id: env.client_id,
    };
    ProtobufPluginIds::try_from(ids)
        .map_err(|e| anyhow!("Failed to serialized plugin ids: {}", e))
        .and_then(|serialized| {
            wasi_write_object(env, &serialized.encode_to_vec())?;
            Ok(())
        })
        .with_context(|| {
            format!(
                "failed to query plugin IDs from host for plugin {}",
                env.name()
            )
        })
        .non_fatal();
}

fn get_zellij_version(env: &PluginEnv) {
    let protobuf_zellij_version = ProtobufZellijVersion {
        version: VERSION.to_owned(),
    };
    wasi_write_object(env, &protobuf_zellij_version.encode_to_vec())

View on GitHub (pinned to 98a0837077)

Solutions

  1. Do a clean rebuild of zellij so protobuf types regenerate consistently
  2. Check the logged {} detail to see which field failed
  3. Report upstream if it reproduces on a stock build — it indicates a proto/struct mismatch
Defensive patterns

Strategy: try-catch

Try / catch

// already non_fatal in-tree: log and continue
ProtobufPluginIds::try_from(ids).map_err(|e| anyhow!("Failed to serialized plugin ids: {e}")).non_fatal();

Prevention

When it happens

Trigger: Only if the PluginIds→ProtobufPluginIds conversion rejects one of its fields — e.g. a path or id representation that the proto conversion refuses. There is no user-controlled input that normally triggers it.

Common situations: Cross-version drift between zellij-server and generated protobuf types after a partial rebuild; exotic environments where the plugin cwd cannot be represented in the proto.

Related errors


AI-assisted analysis of zellij-org/zellij@98a0837077 (2026-08-16). Data as JSON: /api/errors/f718a708bdec7802. Report an issue: GitHub.