jackwener/OpenCLI · info · AuthRequiredError
Waiting for Yuanbao hy_user cookie
Error message
Waiting for Yuanbao hy_user cookie
What it means
An AuthRequiredError thrown by the login poll loop while waiting for the user to complete WeChat login: hasYuanbaoUserCookie still reports no hy_user cookie, so polling continues to signal 'not logged in yet'. It's an expected, transient condition during `yuanbao login` — the error tells the poller the QR code hasn't been scanned/approved yet, and the poll retries until the cookie appears or the deadline expires.
Source
Thrown at clis/yuanbao/auth.js:55
}
for (const v of Object.values(node)) if (v && typeof v === 'object') stack.push(v);
}
return { nickname: stateNick || (nickMatch ? nickMatch[0] : '') };
})()
`);
return { user_id: String(hyUser), nickname: String(probe.nickname || '') };
}
registerSiteAuthCommands({
site: 'yuanbao',
domain: YUANBAO_DOMAIN,
loginUrl: YUANBAO_URL,
columns: ['user_id', 'nickname'],
quickCheck: hasYuanbaoUserCookie,
verify: verifyYuanbaoIdentity,
poll: async (page) => {
if (!await hasYuanbaoUserCookie(page)) {
throw new AuthRequiredError(YUANBAO_DOMAIN, 'Waiting for Yuanbao hy_user cookie');
}
return verifyYuanbaoIdentity(page);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Scan the WeChat QR code with the correct account to complete login — this error is expected until then.
- If it persists past the deadline, restart `yuanbao login` to get a fresh QR code.
- Check network/proxy access to yuanbao.tencent.com if the scan isn't registering.
Defensive patterns
Strategy: retry
Validate before calling
// Expected during login; just ensure a poll deadline exists
const deadline = Date.now() + 120_000;
while (Date.now() < deadline) { /* poll login status */ } Try / catch
try {
await run(['yuanbao', 'login']);
} catch (e) {
if (/Waiting for Yuanbao hy_user cookie/.test(e.message)) {
// still waiting on QR scan — prompt the user, then restart login for a fresh QR
} else throw e;
} Prevention
- Complete the QR scan promptly — the code expires
- Restart the login command for a fresh QR if polling exceeds the deadline
- Scan with the WeChat account you intend to use for the session
- Ensure network access to yuanbao.tencent.com isn't blocked by a proxy
When it happens
Trigger: During `yuanbao login`, each poll tick that runs before the user scans the WeChat QR code and the server sets the hy_user cookie. Every poll iteration until login completes throws this.
Common situations: User simply hasn't scanned the QR yet (normal); QR expired and needs a refresh; user scanned with the wrong WeChat account; corporate proxy blocking the login handshake.
Related errors
- Waiting for Boss wt2 / t cookies
- Waiting for Instagram sessionid cookie
- Waiting for Twitter/X auth cookies
- Waiting for Facebook c_user cookie
- Waiting for Jike login: ${detail}
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/86375bc1d84ae6db.
Report an issue: GitHub.