{"record":{"id":"f22f2e2c006197da","repo":"zeroclaw-labs/zeroclaw","slug":"whatsapp-channel-requires-the-whatsapp-web-featu","errorCode":null,"errorMessage":"WhatsApp channel requires the `whatsapp-web` feature","messagePattern":"WhatsApp channel requires the `whatsapp-web` feature","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-channels/src/orchestrator/mod.rs","lineNumber":9158,"sourceCode":"                        cfg_arc\n                            .read()\n                            .channels\n                            .whatsapp\n                            .get(&alias)\n                            .map(|wa| wa.allowed_groups.clone())\n                            .unwrap_or_default()\n                    })\n                };\n                let workspace_dir = one_shot_channel_workspace_dir(&config, \"whatsapp\", &alias);\n                Ok(Arc::new(\n                    WhatsAppWebChannel::new(wa, alias, peer_resolver, allowed_groups_resolver)\n                        .with_persistence(config_arc.clone())\n                        .with_workspace_dir(workspace_dir),\n                ))\n            }\n            #[cfg(not(feature = \"whatsapp-web\"))]\n            {\n                anyhow::bail!(\"WhatsApp channel requires the `whatsapp-web` feature\");\n            }\n        }\n        #[cfg(feature = \"channel-qq\")]\n        \"qq\" => {\n            let qq = config\n                .channels\n                .qq\n                .get(\"default\")\n                .context(\"QQ 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 || cfg_arc.read().channel_external_peers(\"qq\", &alias))\n            };\n            Ok(Arc::new(QQChannel::new(\n                qq.app_id.clone(),\n                qq.app_secret.clone(),","sourceCodeStart":9140,"sourceCodeEnd":9176,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-channels/src/orchestrator/mod.rs#L9140-L9176","documentation":"Thrown by build_channel_by_id for whatsapp/whatsapp-web/whatsapp_web targets when the `whatsapp-web` cargo feature is not compiled. The web-client construction block is feature-gated; the cfg(not(feature = \"whatsapp-web\")) block bails with the feature name. Note this feature is named `whatsapp-web`, not `channel-whatsapp` — the prefix differs from the other channel gates.","triggerScenarios":"A `[channels.whatsapp.default]` section or `whatsapp.<alias>` send target on a binary built without `whatsapp-web`; reached during daemon startup channel construction or one-shot sends.","commonSituations":"Slim builds enabling only `channel-*` features while forgetting the differently-prefixed `whatsapp-web`; config migrated from a full-featured install to a minimal one; feature renamed across versions breaking build scripts.","solutions":["Rebuild with `cargo build --features whatsapp-web`","Use a prebuilt image that includes whatsapp-web support","Or remove `[channels.whatsapp]` from config"],"exampleFix":"# before\ncargo build --no-default-features --features \"channel-telegram,channel-discord\"\n# error: WhatsApp channel requires the `whatsapp-web` feature\n\n# after\ncargo build --no-default-features --features \"channel-telegram,channel-discord,whatsapp-web\"","handlingStrategy":"validation","validationCode":"#[cfg(not(feature = \"whatsapp-web\"))]\nif config.channels.whatsapp.get(\"default\").is_some() {\n    log::warn!(\"[channels.whatsapp.default] configured but `whatsapp-web` feature is off\");\n}","typeGuard":"fn channel_feature_enabled(channel_type: &str) -> bool {\n    match channel_type {\n        \"whatsapp\" | \"whatsapp-web\" | \"whatsapp_web\" => cfg!(feature = \"whatsapp-web\"),\n        \"telegram\" => cfg!(feature = \"channel-telegram\"),\n        \"discord\" => cfg!(feature = \"channel-discord\"),\n        \"slack\" => cfg!(feature = \"channel-slack\"),\n        \"mattermost\" => cfg!(feature = \"channel-mattermost\"),\n        \"signal\" => cfg!(feature = \"channel-signal\"),\n        \"matrix\" => cfg!(feature = \"channel-matrix\"),\n        _ => false,\n    }\n}","tryCatchPattern":"Err(err) if err.to_string().contains(\"requires the `whatsapp-web` feature\") => {\n    // note the non-standard prefix: rebuild with --features whatsapp-web (not channel-whatsapp)\n}","preventionTips":["Remember the whatsapp feature is `whatsapp-web`, not `channel-whatsapp` — script builds accordingly","Include whatsapp in the startup feature/config consistency check","Centralize the channel->feature map so the prefix difference cannot bite twice"],"tags":["feature-flag","whatsapp","build-configuration","zeroclaw"],"backgroundTag":"missing-compile-time-feature","analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}