jackwener/OpenCLI · info · AuthRequiredError
Waiting for Manus session cookies
Error message
Waiting for Manus session cookies
What it means
This AuthRequiredError is thrown by the poll callback that runs repeatedly while the user completes the browser login flow at manus.im/login. Until a recognized session cookie (auth_session, manus_token, _session, or session) with a non-empty value exists for the manus.im domain, the poller treats the user as still logged out and keeps waiting.
Source
Thrown at clis/manus/auth.js:50
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
- Complete the login in the opened browser window at https://manus.im/login and let the poller continue
- Verify manus.im cookies are not blocked (check browser privacy/extension settings) and retry
- Manually confirm you can see your account on manus.im in the automation browser, then rerun the command
- If Manus changed its cookie name, update the regex in hasManusSessionCookie in clis/manus/auth.js
Example fix
// before (narrow cookie-name match fails if Manus renames its cookie) return cookies.some(c => /^(auth_session|manus_token|_session|session)$/.test(c.name) && c.value); // after (broader match as a fallback) return cookies.some(c => /^(auth_session|manus_token|_session|session|manus-session.*|.*session.*token)$/i.test(c.name) && c.value);
Defensive patterns
Strategy: retry
Validate before calling
const cookies = await page.getCookies({ url: 'https://manus.im' });
const hasSession = cookies.some(c => /^(auth_session|manus_token|_session|session)$/.test(c.name) && c.value);
if (!hasSession) await openLoginPageAndAwaitLogin('https://manus.im/login'); Type guard
function hasManusSession(cookies) {
return Array.isArray(cookies) && cookies.some(
c => typeof c?.name === 'string' && /^(auth_session|manus_token|_session|session)$/.test(c.name) && !!c.value
);
} Try / catch
try {
const identity = await pollAuth(page);
} catch (e) {
if (e instanceof AuthRequiredError && /Waiting for Manus session cookies/.test(e.message)) {
await promptUserToCompleteLogin('https://manus.im/login');
return pollAuth(page); // retry after the user signs in
}
throw e;
} Prevention
- Complete the browser login before running any manus commands
- Don't clear cookies between runs if using a persistent site session
- Check that the automation browser isn't blocking third-party or session cookies
- If login never completes, verify the cookie name hasn't changed in Manus
When it happens
Trigger: Calling any manus auth/whoami command before completing login: the browser session at manus.im has no session cookie yet — either the user hasn't signed in, the login page hasn't finished setting cookies, or existing cookies were cleared or expired.
Common situations: First-time setup before logging in; the login flow was interrupted or the tab closed before sign-in completed; corporate SSO redirect loops; cookies blocked by browser settings or extensions; Manus renamed its session cookie so the regex no longer matches.
Related errors
- Waiting for Bilibili session cookies
- bilibili.com
- Waiting for Douban dbcl2 / ck cookies
- creator.douyin.com
- Waiting for GitHub session cookies
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/11c3ac1d21f86a7a.
Report an issue: GitHub.