zeroclaw-labs/zeroclaw · error · anyhow::Error

Signal channel requires the `channel-signal` feature

Error message

Signal channel requires the `channel-signal` feature

What it means

Thrown by build_channel_by_id when channel_type is `signal` and the `channel-signal` cargo feature is absent from the build. The signal arm (which reads config.channels.signal and constructs the Signal runtime) exists only under the feature; the cfg(not(...)) arm bails naming the feature. Configuration for signal cannot be honored by a binary that lacks the code.

Source

Thrown at crates/zeroclaw-channels/src/orchestrator/mod.rs:9086

                Arc::new(move || cfg_arc.read().channel_external_peers("signal", &alias))
            };
            Ok(Arc::new(
                SignalChannel::new(
                    sg.http_url.clone(),
                    sg.account.clone(),
                    sg.group_ids.clone(),
                    sg.dm_only,
                    alias,
                    peer_resolver,
                    sg.ignore_attachments,
                    sg.ignore_stories,
                )
                .with_approval_timeout_secs(sg.approval_timeout_secs),
            ))
        }
        #[cfg(not(feature = "channel-signal"))]
        "signal" => {
            anyhow::bail!("Signal channel requires the `channel-signal` feature");
        }
        "matrix" => {
            #[cfg(feature = "channel-matrix")]
            {
                let mx = config
                    .channels
                    .matrix
                    .get("default")
                    .context("Matrix channel is not configured")?;
                let alias = "default".to_string();
                let state_dir = matrix_state_dir(&config.config_path, &alias);
                let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {
                    let cfg_arc = config_arc.clone();
                    let alias = alias.clone();
                    Arc::new(move || cfg_arc.read().channel_external_peers("matrix", &alias))
                };
                let ack = mx.ack_reactions.unwrap_or(config.channels.ack_reactions);
                let workspace_dir = one_shot_channel_workspace_dir(&config, "matrix", &alias);

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Rebuild with `cargo build --features channel-signal`
  2. Pick a prebuilt package including signal support
  3. Or remove `[channels.signal]` from the config

Example fix

# before
cargo build --no-default-features
# error: Signal channel requires the `channel-signal` feature

# after
cargo build --no-default-features --features channel-signal
Defensive patterns

Strategy: validation

Validate before calling

#[cfg(not(feature = "channel-signal"))]
if !config.channels.signal.is_empty() {
    log::warn!("[channels.signal.*] configured but `channel-signal` feature is off");
}

Type guard

fn channel_feature_enabled(channel_type: &str) -> bool {
    match channel_type {
        "signal" => cfg!(feature = "channel-signal"),
        "telegram" => cfg!(feature = "channel-telegram"),
        "discord" => cfg!(feature = "channel-discord"),
        "slack" => cfg!(feature = "channel-slack"),
        "mattermost" => cfg!(feature = "channel-mattermost"),
        "matrix" => cfg!(feature = "channel-matrix"),
        "whatsapp" | "whatsapp-web" => cfg!(feature = "whatsapp-web"),
        _ => false,
    }
}

Try / catch

Err(err) if err.to_string().contains("requires the `channel-signal` feature") => {
    // rebuild with --features channel-signal or remove signal config
}

Prevention

When it happens

Trigger: Configured `[channels.signal.*]` alias or a `signal.<alias>` delivery target on a binary compiled without `channel-signal`; surfaces at daemon startup and in one-shot sends.

Common situations: Slim docker images that enable only the channels the deployment uses; a rebuild after Cargo feature pruning; config drift between environments with different feature sets.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/0eaaf704f56a11d1. Report an issue: GitHub.