jackwener/OpenCLI · error · CommandExecutionError
HTTP ${probe.httpStatus} from Jimeng passport
Error message
HTTP ${probe.httpStatus} from Jimeng passport What it means
When the in-page WHOAMI_PROBE's HTTP call to Jimeng passport completes with a non-OK HTTP status (kind 'http'), verifyJimengIdentity throws CommandExecutionError including the status. This means the identity check reached the passport server but got an error response, distinct from auth (401-style) or JS exceptions.
Source
Thrown at clis/jimeng/auth.js:29
try {
const r = await fetch('/passport/account/info/v2/?aid=513695', { credentials: 'include', headers: { Accept: 'application/json' } });
if (r.status === 401 || r.status === 403) return { kind: 'auth', detail: 'Jimeng passport HTTP ' + r.status };
if (!r.ok) return { kind: 'http', httpStatus: r.status };
const d = await r.json();
const u = d && d.data;
if (!u || !u.user_id || u.is_visitor_account) return { kind: 'auth', detail: 'Jimeng passport returned a visitor account (anonymous)' };
return { ok: true, user_id: String(u.user_id_str || u.user_id), screen_name: String(u.screen_name || u.name || '') };
} catch (e) {
return { kind: 'exception', detail: String(e && e.message || e) };
}
})()`;
async function verifyJimengIdentity(page) {
await page.goto('https://jimeng.jianying.com/ai-tool/generate?type=image&workspace=0');
await page.wait(2);
const probe = await page.evaluate(WHOAMI_PROBE);
if (probe?.kind === 'auth') throw new AuthRequiredError('jimeng.jianying.com', probe.detail);
if (probe?.kind === 'http') throw new CommandExecutionError(`HTTP ${probe.httpStatus} from Jimeng passport`);
if (probe?.kind === 'exception') throw new CommandExecutionError(`Jimeng whoami failed: ${probe.detail}`);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected Jimeng probe: ${JSON.stringify(probe)}`);
return { user_id: probe.user_id, screen_name: probe.screen_name };
}
registerSiteAuthCommands({
site: 'jimeng',
domain: 'jimeng.jianying.com',
loginUrl: 'https://jimeng.jianying.com/',
columns: ['user_id', 'screen_name'],
verify: verifyJimengIdentity,
poll: async (page) => {
const probe = await page.evaluate(WHOAMI_PROBE);
if (!probe?.ok) throw new AuthRequiredError('jimeng.jianying.com', 'Waiting for Jimeng login');
return { user_id: probe.user_id, screen_name: probe.screen_name };
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Check the reported HTTP status: 5xx → retry later; 429 → wait and reduce probe frequency; 403 → investigate anti-bot blocking
- Load jimeng.jianying.com manually in the attached Chrome and confirm normal browsing works
- Retry after a delay; the failure may be transient
- Disable proxies/VPN that could be blocked by Jimeng's edge
- If it persists, verify the passport endpoint URL used by WHOAMI_PROBE is still current
Example fix
// before
await verifyJimengIdentity(page);
// after
try {
await verifyJimengIdentity(page);
} catch (err) {
if (/HTTP \d+ from Jimeng passport/.test(err.message)) {
await new Promise(r => setTimeout(r, 5000)); // transient passport error
return verifyJimengIdentity(page);
}
throw err;
} Defensive patterns
Strategy: retry
Type guard
function isJimengHttpStatusError(err) {
return err instanceof CommandExecutionError && /HTTP \d+ from Jimeng passport/.test(err.message);
} Try / catch
try {
const identity = await verifyJimengIdentity(page);
} catch (err) {
if (isJimengHttpStatusError(err) && /HTTP (429|5\d\d)/.test(err.message)) {
await sleep(5000);
return verifyJimengIdentity(page);
}
throw err;
} Prevention
- Avoid probing the passport endpoint in tight loops (429 risk)
- Retry 5xx with backoff; don't hammer the service
- Disable proxies likely blocked by Jimeng's edge
- Manually browse jimeng.jianying.com to confirm service health before automation
When it happens
Trigger: The probe's fetch to the Jimeng passport endpoint returns a status like 403 (WAF/bot block), 429 (rate limit), or 5xx, with httpStatus carried back to the page-level evaluate result.
Common situations: Jimeng passport under heavy load (5xx); automated access blocked by anti-bot measures (403); too-frequent probes (429); regional restrictions or network middleware altering responses.
Related errors
- 1point3acres request failed: HTTP ${res.status} ${res.status
- ${label} returned HTTP ${resp.status} (${url})
- coingecko derivatives returned HTTP ${resp.status}
- ${label} returned HTTP ${outcome.status}
- ${label} returned HTTP ${resp.status}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/16c9fabdf5f04375.
Report an issue: GitHub.