zeroclaw-labs/zeroclaw · error · anyhow::Error
WeCom WebSocket channel requires the `channel-wecom-ws` feat
Error message
WeCom WebSocket channel requires the `channel-wecom-ws` feature
What it means
Raised by build_channel_by_id when the channel id matches the WeCom WebSocket guard — literal "wecom_ws"/"wecom-ws" or any alias prefixed "wecom_ws."/"wecom-ws." — and the binary lacks the `channel-wecom-ws` feature. That feature is not a cfg-only flag: it pulls dep:aes and dep:cbc for decrypting WeCom WebSocket payloads (see wecom_ws.rs). The guard matches before the id falls through to unknown-channel handling, so aliased instances get the feature hint too.
Source
Thrown at crates/zeroclaw-channels/src/orchestrator/mod.rs:9313
WeComWsRuntimePolicy::from_config(&snapshot, external_peers)
}
})
};
Ok(Arc::new(WeComWsChannel::new_with_alias(
wc,
alias.clone(),
policy_resolver,
&config.channel_workspace_dir(&format!("wecom_ws.{alias}")),
)?))
}
#[cfg(not(feature = "channel-wecom-ws"))]
channel_id
if channel_id == "wecom_ws"
|| channel_id == "wecom-ws"
|| channel_id.starts_with("wecom_ws.")
|| channel_id.starts_with("wecom-ws.") =>
{
anyhow::bail!("WeCom WebSocket channel requires the `channel-wecom-ws` feature");
}
#[cfg(feature = "channel-wechat")]
"wechat" => {
let wc = config
.channels
.wechat
.get("default")
.context("WeChat channel is not configured")?;
let alias = "default".to_string();
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("wechat", &alias))
};
let workspace_dir = one_shot_channel_workspace_dir(&config, "wechat", &alias);
Ok(Arc::new(
WeChatChannel::new(
alias,View on GitHub (pinned to 88bb9c8533)
Solutions
- Rebuild with cargo build --release --features channel-wecom-ws (pulls aes/cbc deps)
- Or use --features channels-full which includes channel-wecom-ws
- Or delete the [channels.wecom_ws.*] / wecom-ws blocks and their agent bindings
- Pre-check zeroclaw_channels::listing::is_channel_type_compiled("wecom_ws") — listing.rs registers both wecom_ws keys
Example fix
# before cargo build --release --features channel-wecom # config: [channels.wecom_ws.default] -> bail # after cargo build --release --features "channel-wecom,channel-wecom-ws"
Defensive patterns
Strategy: validation
Validate before calling
use zeroclaw_channels::listing::is_channel_type_compiled;
let id = "wecom_ws.ops";
let is_ws = id == "wecom_ws" || id == "wecom-ws"
|| id.starts_with("wecom_ws.") || id.starts_with("wecom-ws.");
if is_ws && !is_channel_type_compiled("wecom_ws") {
eprintln!("rebuild with --features channel-wecom-ws for {id}");
} Type guard
fn wecom_ws_id(id: &str) -> bool {
id == "wecom_ws" || id == "wecom-ws"
|| id.starts_with("wecom_ws.") || id.starts_with("wecom-ws.")
}
fn wecom_ws_available() -> bool {
zeroclaw_channels::listing::is_channel_type_compiled("wecom_ws")
} Try / catch
match build_channel_by_id(&config_arc, "wecom_ws.ops") {
Ok(ch) => { /* use */ }
Err(e) if e.to_string().contains("requires the `channel-wecom-ws` feature") => {
// skip; rebuild needed
}
Err(e) => return Err(e),
} Prevention
- Alias validation should accept all four spellings the guard accepts, so your pre-check matches the factory's routing
- channel-wecom-ws pulls aes/cbc — keep it enabled in the same profile that builds wecom_ws configs
When it happens
Trigger: start_channels / build_channel_by_id with channel_id equal to "wecom_ws", "wecom-ws", or an alias like "wecom_ws.ops" / "wecom-ws.ops", in a build compiled without channel-wecom-ws.
Common situations: Default-feature builds; or enabling only `channel-wecom` (callback mode) and assuming it covers WebSocket mode; or multi-alias configs ([channels.wecom_ws.ops]) on a slim binary where the prefixed-alias guard is the only thing that recognizes the id.
Related errors
- WeCom channel requires the `channel-wecom` feature
- QQ channel requires the `channel-qq` feature
- Lark channel requires the `channel-lark` feature
- DingTalk channel requires the `channel-dingtalk` feature
- WeChat channel requires the `channel-wechat` feature
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/24c0787de7bc1047.
Report an issue: GitHub.