{"record":{"id":"de8bccfedc496069","repo":"BigPizzaV3/CodexPlusPlus","slug":"token","errorCode":null,"errorMessage":"微信连接 token 为空","messagePattern":"微信连接 token 为空","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/codex-plus-manager/src-tauri/src/commands.rs","lineNumber":1185,"sourceCode":"}\n\nfn spawn_weixin_connect(\n    settings: BackendSettings,\n) -> anyhow::Result<codex_plus_core::connect::WeixinConnectStatus> {\n    let config = codex_plus_core::connect::WeixinConnectConfig {\n        base_url: settings.weixin_connect_base_url,\n        token: settings.weixin_connect_token,\n        account_id: settings.weixin_connect_account_id,\n        allow_from: settings.weixin_connect_allow_from,\n        route_tag: settings.weixin_connect_route_tag,\n        work_dir: settings.weixin_connect_work_dir,\n        model: settings.weixin_connect_model,\n        sandbox: settings.weixin_connect_sandbox,\n        codex_path: settings.weixin_connect_codex_path,\n    }\n    .normalized();\n    if config.token.is_empty() {\n        anyhow::bail!(\"微信连接 token 为空\");\n    }\n    let stop = Arc::new(AtomicBool::new(false));\n    let mut runtime = weixin_runtime()\n        .lock()\n        .map_err(|_| anyhow::anyhow!(\"微信连接运行锁已损坏\"))?;\n    if runtime.is_some() {\n        anyhow::bail!(\"微信连接已在运行或正在停止\");\n    }\n    *runtime = Some(WeixinRuntime {\n        stop: Arc::clone(&stop),\n    });\n    drop(runtime);\n    let status = weixin_status();\n    if let Ok(mut current) = status.lock() {\n        current.state = \"starting\".to_string();\n        current.message = \"正在启动微信连接...\".to_string();\n        current.account_id = config.account_id.clone();\n        current.has_token = true;","sourceCodeStart":1167,"sourceCodeEnd":1203,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/apps/codex-plus-manager/src-tauri/src/commands.rs#L1167-L1203","documentation":"Thrown by spawn_weixin_connect after building and normalizing the WeixinConnectConfig from BackendSettings. Fires when the normalized weixin_connect_token field is empty, meaning the user enabled the WeChat connect feature without pasting the verification token the WeChat side requires. The offending input is settings.weixin_connect_token (empty after normalization); the connection is never started until a token is supplied.","triggerScenarios":"Thrown at apps/codex-plus-manager/src-tauri/src/commands.rs:1185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter the weixin connect token in Codex++ settings","Verify the token wasn't cleared by a settings migration","Re-copy the token from the bridge service"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}