jackwener/OpenCLI · error · CommandExecutionError
Unexpected Manus probe: ${JSON.stringify(probe)}
Error message
Unexpected Manus probe: ${JSON.stringify(probe)} What it means
verifyManusIdentity probes https://manus.im/api/auth/session in the page context and classifies the result into known kinds ('auth', 'http', 'exception', or a successful ok:true payload). If the probe object is falsy, lacks ok:true, and matches none of the known kinds, the library throws this CommandExecutionError because the session endpoint returned an unrecognized shape it cannot interpret.
Source
Thrown at clis/manus/auth.js:38
}
if (r.status === 503) {
return { kind: 'http', httpStatus: 503 };
}
if (!r.ok) return { kind: 'http', httpStatus: r.status };
const d = await r.json();
const u = d?.user || d;
if (!u || !(u.id || u.userId)) {
return { kind: 'auth', detail: 'Manus /api/auth/session 200 but no user' };
}
return { ok: true, user_id: String(u.id || u.userId), name: String(u.name || u.displayName || '') };
} catch (e) {
return { kind: 'exception', detail: String(e && e.message || e) };
}
})()`);
if (probe?.kind === 'auth') throw new AuthRequiredError('manus.im', probe.detail);
if (probe?.kind === 'http') throw new CommandExecutionError(`HTTP ${probe.httpStatus} from Manus /api/auth/session`);
if (probe?.kind === 'exception') throw new CommandExecutionError(`Manus whoami failed: ${probe.detail}`);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected Manus probe: ${JSON.stringify(probe)}`);
return { user_id: probe.user_id, name: probe.name };
}
registerSiteAuthCommands({
site: 'manus',
domain: 'manus.im',
loginUrl: 'https://manus.im/login',
columns: ['user_id', 'name'],
verify: verifyManusIdentity,
poll: async (page) => {
if (!await hasManusSessionCookie(page)) {
throw new AuthRequiredError('manus.im', 'Waiting for Manus session cookies');
}
return verifyManusIdentity(page);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Log out and log back in at https://manus.im/login to refresh the session, then retry
- Log the raw probe JSON in the error message to inspect the unexpected shape the endpoint returned
- Check whether Manus changed the /api/auth/session response schema and update the probe parsing in clis/manus/auth.js
- Retry later or from a clean browser profile in case a proxy, VPN, or extension is tampering with responses
Example fix
// before (probe parsed loosely, may fall through)
const d = await r.json();
const u = d?.user || d;
if (!u || !(u.id || u.userId)) {
return { kind: 'auth', detail: 'Manus /api/auth/session 200 but no user' };
}
// after (handle nested or renamed fields explicitly)
const d = await r.json();
const u = d?.user || d?.currentUser || d?.session?.user || d;
const uid = u?.id ?? u?.userId ?? u?.uid;
if (!u || !uid) {
return { kind: 'auth', detail: 'Manus /api/auth/session 200 but no user' };
}
return { ok: true, user_id: String(uid), name: String(u.name || u.displayName || '') }; Defensive patterns
Strategy: try-catch
When it happens
Trigger: The in-page fetch to /api/auth/session resolves with a 2xx status but the parsed JSON doesn't yield a user object with id/userId (which would normally be classified as 'auth'), or the probe value returned by page.evaluate is null/undefined or a malformed object, e.g. the evaluate script itself was intercepted or the API response shape changed.
Common situations: Manus changes their /api/auth/session response schema (e.g. nests the user differently or renames id/userId); a browser extension or CSP blocks/rewrites the fetch; the page context returns undefined because evaluate failed silently; bot-detection returns 200 with an HTML or challenge body instead of JSON.
Related errors
- 发布闲鱼需要先登录,请在 Chrome 中打开 goofish.com 并完成登录
- 未获取到课程列表
- Chaoxing session cookies missing
- ChatGPT did not create a conversation URL after sending the
- ChatGPT project requires a logged-in ChatGPT session.
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/380a45447ec4c959.
Report an issue: GitHub.