jackwener/OpenCLI · warning · AuthRequiredError
Waiting for Xianyu unb/tracknick cookie
Error message
Waiting for Xianyu unb/tracknick cookie
What it means
During login polling, the poll callback checks for the unb/tracknick identity cookies before verifying; if hasXianyuIdentityCookie(page) is false, it throws AuthRequiredError to signal the login is not yet complete and polling should continue.
Source
Thrown at clis/xianyu/auth.js:64
}
}
const nickname = probe.domNick || decodedTracknick;
if (!userId && !nickname) {
throw new CommandExecutionError('Xianyu /personal rendered but no user identity extractable — stale unb or layout drift');
}
return { user_id: String(userId), nickname: String(nickname) };
}
registerSiteAuthCommands({
site: 'xianyu',
domain: 'goofish.com',
loginUrl: 'https://www.goofish.com/login',
columns: ['user_id', 'nickname'],
quickCheck: hasXianyuIdentityCookie,
verify: verifyXianyuIdentity,
poll: async (page) => {
if (!await hasXianyuIdentityCookie(page)) {
throw new AuthRequiredError('goofish.com', 'Waiting for Xianyu unb/tracknick cookie');
}
return verifyXianyuIdentity(page);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Wait and keep polling — this is expected until login completes
- Complete the login in the automated browser (scan QR / enter credentials)
- Verify cookies are not blocked and the profile persists them
- If it never appears, confirm the login URL and flow actually set unb/tracknick
Example fix
// before
const identity = await poll(page); // throws until cookies set
// after
try {
const identity = await poll(page);
} catch (e) {
if (e instanceof AuthRequiredError) {
await waitForLoginCompletion(page); // keep polling with backoff
} else throw e;
} Defensive patterns
Strategy: retry
Validate before calling
const hasCookies = await hasXianyuIdentityCookie(page);
if (!hasCookies) await waitFor(() => hasXianyuIdentityCookie(page), { timeoutMs: 120000 }); Try / catch
try {
return await poll(page);
} catch (e) {
if (e?.name === 'AuthRequiredError') {
await sleep(2000);
return poll(page); // expected until login completes
}
throw e;
} Prevention
- Treat this as a normal polling signal, not a fatal failure
- Bound polling with a timeout and prompt the user if exceeded
- Ensure the browser allows cookies for goofish.com
When it happens
Trigger: Polling after the user opens the goofish.com login URL; the browser has not yet received the unb and tracknick cookies because login is still in progress.
Common situations: User has not finished logging in yet (QR scan or password step pending); cookies blocked by browser settings; wrong login flow used that never sets these cookies.
Related errors
- Waiting for Bilibili session cookies
- Waiting for Douban dbcl2 / ck cookies
- Waiting for GitHub session cookies
- Waiting for Manus session cookies
- Waiting for Nowcoder login
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/670867132d7a4742.
Report an issue: GitHub.