zeroclaw-labs/zeroclaw · error

LINE channel requires the `channel-line` feature

Error message

LINE channel requires the `channel-line` feature

What it means

Raised by build_channel_by_id in the "line" arm when the binary was compiled without the `channel-line` feature. Like Lark, LINE uses an inner cfg block: the arm body collapses to the bail when the feature is absent. The enabled arm calls LineChannel::from_config(ln, alias, peer_resolver, sender_name_resolver).with_persistence(...) using [channels.line] config.

Source

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

                    let alias = alias.clone();
                    Arc::new(move || {
                        cfg_arc
                            .read()
                            .channels
                            .line
                            .get(&alias)
                            .and_then(|ln| ln.sender_name.clone())
                            .filter(|s| !s.is_empty())
                    })
                };
                Ok(Arc::new(
                    LineChannel::from_config(ln, alias, peer_resolver, sender_name_resolver)
                        .with_persistence(config_arc.clone()),
                ))
            }
            #[cfg(not(feature = "channel-line"))]
            {
                anyhow::bail!("LINE channel requires the `channel-line` feature");
            }
        }
        "voice-call" => {
            #[cfg(feature = "channel-voice-call")]
            {
                let (alias, vc) = config
                    .channels
                    .voice_call
                    .iter()
                    .next()
                    .context("Voice Call channel is not configured")?;
                Ok(Arc::new(VoiceCallChannel::new(alias.clone(), vc.clone())))
            }
            #[cfg(not(feature = "channel-voice-call"))]
            {
                anyhow::bail!("Voice Call channel requires the `channel-voice-call` feature");
            }
        }

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Rebuild with cargo build --release --features channel-line
  2. Or use --features channels-full
  3. Or remove [channels.line] and "line" bindings
  4. Verify with zeroclaw_channels::listing::is_channel_type_compiled("line")

Example fix

# before
 cargo build --release

 # after
 cargo build --release --features channel-line
Defensive patterns

Strategy: validation

Validate before calling

use zeroclaw_channels::listing::is_channel_type_compiled;

if !is_channel_type_compiled("line") {
    eprintln!("rebuild with --features channel-line or remove [channels.line]");
}

Type guard

fn line_available() -> bool {
    zeroclaw_channels::listing::is_channel_type_compiled("line")
}

Try / catch

match build_channel_by_id(&config_arc, "line") {
    Ok(ch) => { /* use */ }
    Err(e) if e.to_string().contains("requires the `channel-line` feature") => {
        // skip; rebuild hint
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: start_channels / build_channel_by_id selecting "line" from an [channels.line] block or agent binding in a build lacking --features channel-line.

Common situations: Default-feature builds (line is in channels-full only); deployments where the Messaging-Line binding was added to config but the daemon image was built with a minimal channel set; channel-line is a pure cfg gate with no extra deps, so it is often overlooked in hand-written feature lists.

Related errors


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