jackwener/OpenCLI · error · CommandExecutionError
HTTP ${probe.httpStatus} from auth_data
Error message
HTTP ${probe.httpStatus} from auth_data What it means
The in-page probe POSTs to /cgi-bin/mmfinderassistant-bin/auth/auth_data with credentials included. If the HTTP response status is not ok (2xx), the probe returns kind:'http' and this CommandExecutionError surfaces the status code — the request itself failed at the transport/HTTP layer rather than returning an auth payload.
Source
Thrown at clis/wechat-channels/auth.js:43
});
if (!r.ok) return { kind: 'http', httpStatus: r.status };
const d = await r.json();
if (!d || d.base_resp?.ret !== 0) {
return { kind: 'auth', detail: 'WeChat Channels auth_data base_resp.ret=' + String(d?.base_resp?.ret) };
}
const fu = d.data?.finder_user || d.finder_user || {};
const userId = String(fu.uniq_id || fu.username || '');
const name = String(fu.nickname || fu.name || '');
if (!userId && !name) {
return { kind: 'auth', detail: 'WeChat Channels auth_data 200 but finder_user empty' };
}
return { ok: true, user_id: userId, name };
} catch (e) {
return { kind: 'exception', detail: String(e && e.message || e) };
}
})()`);
if (probe?.kind === 'auth') throw new AuthRequiredError('channels.weixin.qq.com', probe.detail);
if (probe?.kind === 'http') throw new CommandExecutionError(`HTTP ${probe.httpStatus} from auth_data`);
if (probe?.kind === 'exception') throw new CommandExecutionError(`WeChat Channels whoami failed: ${probe.detail}`);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected WeChat Channels probe: ${JSON.stringify(probe)}`);
return { user_id: probe.user_id, name: probe.name };
}
registerSiteAuthCommands({
site: 'wechat-channels',
domain: 'channels.weixin.qq.com',
loginUrl: 'https://channels.weixin.qq.com/login.html?from=assistant',
columns: ['user_id', 'name'],
quickCheck: hasWechatChannelsSessionCookie,
verify: verifyWechatChannelsIdentity,
poll: async (page) => {
if (!await hasWechatChannelsSessionCookie(page)) {
throw new AuthRequiredError('channels.weixin.qq.com', 'Waiting for WeChat Channels sessionid cookie');
}
return verifyWechatChannelsIdentity(page);
},View on GitHub (pinned to 49907e53dc)
Solutions
- Note the status: 401/403 → re-login via login.html QR flow; 429 → wait and back off; 5xx → retry later.
- Retry after a delay — transient 5xx/429 usually resolves.
- Re-login to refresh the session if 401/403 persists.
- Reduce call frequency to avoid rate limits / risk control.
- Check network path (proxy/VPN) isn't intercepting channels.weixin.qq.com.
Example fix
// before wechat-channels whoami # HTTP 429 from auth_data // after sleep 60 && wechat-channels whoami # back off, then retry // for 401/403: wechat-channels login first
Defensive patterns
Strategy: retry
Validate before calling
// Parse the status from the message and branch
const m = /HTTP (\d+) from auth_data/.exec(e.message);
if (m) {
const status = Number(m[1]);
if (status === 401 || status === 403) await runLoginFlow();
else if (status === 429 || status >= 500) await sleep(60000);
} Try / catch
try {
await verifyWechatChannelsIdentity(page);
} catch (e) {
if (/HTTP 5\d\d|HTTP 429/.test(e.message)) {
await sleep(backoff); return verifyWechatChannelsIdentity(page); // retry with backoff
}
if (/HTTP 40[13]/.test(e.message)) { await runLoginFlow(); return verifyWechatChannelsIdentity(page); }
throw e;
} Prevention
- Implement exponential backoff for 429/5xx
- Re-login on 401/403 instead of retrying blindly
- Throttle scripted call frequency to avoid rate limits
- Check proxy/VPN interference if failures are consistent
When it happens
Trigger: Server returns 4xx/5xx from auth_data: session rejected with 401/403, rate limiting 429, server error 5xx, maintenance window, or a proxy/firewall altering the response.
Common situations: Transient WeChat server errors or maintenance; IP rate-limited due to frequent scripted calls; corporate proxy intercepting the request; account risk-control blocking API access.
Understand the failure class
Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.
Related errors
- HTTP ${probe.httpStatus} from Gitee /api/v5/user
- HTTP ${r.status} from ${r.where}
- HTTP ${code}
- 12306 queryByTrainNo returned HTTP ${resp.status}
- 12306 queryByTrainNo returned non-JSON body
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/6a79b617d5c1b03b.
Report an issue: GitHub.