BigPizzaV3/CodexPlusPlus · error · anyhow::Error
微信连接已在运行或正在停止
Error message
微信连接已在运行或正在停止
What it means
Guard inside spawn_weixin_connect that fires when the WeChat connect runtime refuses to start because another connect instance is currently active or a previous one is still shutting down. The offending input is the shared run-state (lock/stop flag) of the WeChat connect feature, not user text: it indicates a lifecycle conflict — stop the running instance (or wait for the in-progress stop to finish) before spawning again.
Source
Thrown at apps/codex-plus-manager/src-tauri/src/commands.rs:1192
token: settings.weixin_connect_token,
account_id: settings.weixin_connect_account_id,
allow_from: settings.weixin_connect_allow_from,
route_tag: settings.weixin_connect_route_tag,
work_dir: settings.weixin_connect_work_dir,
model: settings.weixin_connect_model,
sandbox: settings.weixin_connect_sandbox,
codex_path: settings.weixin_connect_codex_path,
}
.normalized();
if config.token.is_empty() {
anyhow::bail!("微信连接 token 为空");
}
let stop = Arc::new(AtomicBool::new(false));
let mut runtime = weixin_runtime()
.lock()
.map_err(|_| anyhow::anyhow!("微信连接运行锁已损坏"))?;
if runtime.is_some() {
anyhow::bail!("微信连接已在运行或正在停止");
}
*runtime = Some(WeixinRuntime {
stop: Arc::clone(&stop),
});
drop(runtime);
let status = weixin_status();
if let Ok(mut current) = status.lock() {
current.state = "starting".to_string();
current.message = "正在启动微信连接...".to_string();
current.account_id = config.account_id.clone();
current.has_token = true;
}
let task_status = Arc::clone(&status);
let task_stop = Arc::clone(&stop);
tauri::async_runtime::spawn(async move {
if let Err(error) = codex_plus_core::connect::run_weixin_connect(
config,
stop,View on GitHub (pinned to f2074595a2)
Solutions
- Wait for the existing connect to stop, then retry
- Use the already-running connection instead of spawning a new one
- Force-stop the current weixin connect if stuck
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at apps/codex-plus-manager/src-tauri/src/commands.rs:1192 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/0b8947a7b72cf95e.
Report an issue: GitHub.