{"record":{"id":"8c6e57feafc48360","repo":"zeroclaw-labs/zeroclaw","slug":"wechat-channel-requires-the-channel-wechat-featu","errorCode":null,"errorMessage":"WeChat channel requires the `channel-wechat` feature","messagePattern":"WeChat channel requires the `channel-wechat` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9343,"sourceCode":"                let alias = alias.clone();\n                Arc::new(move || cfg_arc.read().channel_external_peers(\"wechat\", &alias))\n            };\n            let workspace_dir = one_shot_channel_workspace_dir(&config, \"wechat\", &alias);\n            Ok(Arc::new(\n                WeChatChannel::new(\n                    alias,\n                    peer_resolver,\n                    wc.api_base_url.clone(),\n                    wc.cdn_base_url.clone(),\n                    Some(WeChatChannel::resolve_state_dir(wc.state_dir.as_deref())),\n                )?\n                .with_persistence(config_arc.clone())\n                .with_workspace_dir(workspace_dir),\n            ))\n        }\n        #[cfg(not(feature = \"channel-wechat\"))]\n        \"wechat\" => {\n            anyhow::bail!(\"WeChat channel requires the `channel-wechat` feature\");\n        }\n        #[cfg(feature = \"channel-nextcloud\")]\n        \"nextcloud_talk\" | \"nextcloud-talk\" => {\n            let nc = config\n                .channels\n                .nextcloud_talk\n                .get(\"default\")\n                .context(\"Nextcloud Talk channel is not configured\")?;\n            let alias = \"default\".to_string();\n            let peer_resolver: Arc<dyn Fn() -> Vec<String> + Send + Sync> = {\n                let cfg_arc = config_arc.clone();\n                let alias = alias.clone();\n                Arc::new(move || {\n                    cfg_arc\n                        .read()\n                        .channel_external_peers(\"nextcloud_talk\", &alias)\n                })\n            };","sourceCodeStart":9325,"sourceCodeEnd":9361,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9325-L9361","documentation":"Raised by build_channel_by_id when channel_id = \"wechat\" is requested but the binary lacks the `channel-wechat` Cargo feature. Notably, `channel-wechat` is NOT part of the `channels-full` bundle in crates/zeroclaw-channels/Cargo.toml — it must be enabled by name. It also carries real optional deps (aes, ecb, md5, mime_guess, qrcode), which is why it is kept out of the bundle.","triggerScenarios":"start_channels / build_channel_by_id selecting \"wechat\" (from [channels.wechat] or an agent binding) in any build that did not pass --features channel-wechat explicitly — including --features channels-full builds.","commonSituations":"Operators enabling channels-full and assuming it means every channel; WeChat support requires the named feature. Also default builds, and prebuilt binaries where WeChat was excluded deliberately (QR-login flow in login_relink.rs is also wechat-gated).","solutions":["Rebuild with the feature by name: cargo build --release --features channel-wechat (channels-full does NOT include it)","Double-check the feature list actually passed to the binary crate you run, not just to zeroclaw-channels","Or remove [channels.wechat] and \"wechat\" agent bindings from the config","Verify with zeroclaw_channels::listing::is_channel_type_compiled(\"wechat\")"],"exampleFix":"# before\n cargo build --release --features channels-full   # still no wechat\n\n # after\n cargo build --release --features \"channels-full,channel-wechat\"","handlingStrategy":"validation","validationCode":"use zeroclaw_channels::listing::is_channel_type_compiled;\n\nif !is_channel_type_compiled(\"wechat\") {\n    eprintln!(\"channel-wechat is NOT in channels-full; rebuild with --features channel-wechat\");\n}","typeGuard":"fn wechat_available() -> bool {\n    zeroclaw_channels::listing::is_channel_type_compiled(\"wechat\")\n}","tryCatchPattern":"match build_channel_by_id(&config_arc, \"wechat\") {\n    Ok(ch) => { /* use */ }\n    Err(e) if e.to_string().contains(\"requires the `channel-wechat` feature\") => {\n        // skip; note that channels-full does not fix this one\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Document in deploy runbooks that wechat (like matrix/nostr/whatsapp-web) is outside channels-full and needs its own feature","Assert the exact cargo features used to build the shipped binary, e.g. record `cargo tree -f \"{f}\"` output alongside releases"],"tags":["rust","cargo-features","feature-gate","zeroclaw","channels","wechat"],"backgroundTag":"cargo-feature-not-enabled","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}