jackwener/OpenCLI · info · AuthRequiredError
Waiting for Taobao tracknick cookie
Error message
Waiting for Taobao tracknick cookie
What it means
The taobao auth registration's poll() callback throws AuthRequiredError with this message whenever hasTaobaoSessionCookie(page) is false during the login-completion polling loop. It is an expected control-flow signal telling the CLI 'keep waiting, the user hasn't finished logging in yet'.
Source
Thrown at clis/taobao/auth.js:54
decodedTracknick = tracknick;
}
const nickname = domInfo.nickname || decodedTracknick;
if (!domInfo.user_id) {
throw new CommandExecutionError('Taobao my_itaobao rendered but no user_id extractable — stale cookie2 or layout drift');
}
return { user_id: String(domInfo.user_id), nickname: String(nickname) };
}
registerSiteAuthCommands({
site: 'taobao',
domain: 'taobao.com',
loginUrl: 'https://login.taobao.com/member/login.jhtml',
columns: ['user_id', 'nickname'],
quickCheck: hasTaobaoSessionCookie,
verify: verifyTaobaoIdentity,
poll: async (page) => {
if (!await hasTaobaoSessionCookie(page)) {
throw new AuthRequiredError('taobao.com', 'Waiting for Taobao tracknick cookie');
}
return verifyTaobaoIdentity(page);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Wait — this error is expected until login completes; keep polling until it stops throwing
- Complete the login in the browser window (credentials/captcha/QR scan)
- If it persists after successful login, verify cookies land on the taobao.com domain (devtools check)
- Restart the login flow with a clean context if the page is stuck in a captcha loop
Defensive patterns
Strategy: try-catch
Validate before calling
const ready = await hasTaobaoSessionCookie(page);
if (!ready) console.log('Login not complete yet — waiting...'); Try / catch
try {
const identity = await pollTaobaoAuth(page);
} catch (e) {
if (e instanceof AuthRequiredError && /Waiting for Taobao tracknick/.test(e.message)) {
// expected: keep waiting for the user to finish login
return scheduleRetry(page);
}
throw e;
} Prevention
- Only treat this as an error if polling exceeded a timeout budget
- Prompt the user to complete login (including captcha) before/while polling
- Use waitForFunction on a session-cookie presence check instead of fixed-interval polling
When it happens
Trigger: Any poll tick of the taobao login flow (loginUrl https://login.taobao.com/member/login.jhtml) where the quick-check hasTaobaoSessionCookie finds no tracknick/session cookie yet — i.e., before the user completes login.
Common situations: User hasn't typed credentials yet during interactive login; slider captcha blocking login; user scanned QR but Taobao hasn't set cookies; polling started against a fresh context.
Related errors
- Waiting for Jike login: ${detail}
- Waiting for Jimeng login
- Waiting for Ke lianjia_token cookie
- Waiting for Kimi auth cookies
- Waiting for LinkedIn li_at cookie
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/27e57440edb29681.
Report an issue: GitHub.