jackwener/OpenCLI · error · AuthRequiredError
auth
Error message
auth
What it means
AuthRequiredError('coupang.com') thrown by verifyCoupangIdentity when the in-page probe of https://www.coupang.com/np/mypage reports kind 'auth'. This happens when mypage redirects to login.coupang.com/login (anonymous session despite cookies), Coupang returns 'Access Denied' (anti-bot or non-KR IP), or the mypage loads with HTTP 200 but no member-name element is found. Any of these mean Coupang does not consider the session a valid logged-in member.
Source
Thrown at clis/coupang/auth.js:31
await page.goto('https://www.coupang.com/np/mypage');
await page.wait(3);
const probe = await page.evaluate(`
(() => {
if (/login\\.coupang\\.com\\/login/.test(location.href)) {
return { kind: 'auth', detail: 'Coupang mypage redirected to login — anonymous' };
}
if (/Access Denied/i.test(document.title)) {
return { kind: 'auth', detail: 'Coupang Access Denied — anti-bot or non-KR IP' };
}
const el = document.querySelector('.my-nickname, .member-name, .mp-user-info-name, [class*=memberName]');
const name = (el?.textContent || '').trim();
if (!name) {
return { kind: 'auth', detail: 'Coupang mypage 200 but no member-name surface' };
}
return { ok: true, name };
})()
`);
if (probe?.kind === 'auth') throw new AuthRequiredError('coupang.com', probe.detail);
if (!probe?.ok) throw new CommandExecutionError(`Unexpected Coupang probe: ${JSON.stringify(probe)}`);
return { name: probe.name };
}
registerSiteAuthCommands({
site: 'coupang',
domain: 'coupang.com',
loginUrl: 'https://login.coupang.com/login/login.pang',
columns: ['name'],
verify: verifyCoupangIdentity,
poll: async (page) => {
if (!await hasCoupangSessionCookie(page)) {
throw new AuthRequiredError('coupang.com', 'Waiting for Coupang session cookies');
}
return verifyCoupangIdentity(page);
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Re-login in the controlled Chrome (coupang auth login coupang) to refresh the session
- Check the probe.detail in the error: 'redirected to login' → re-login; 'Access Denied' → use a KR/residential IP or slower polling; 'no member-name surface' → update the name selectors to match current mypage markup
- Avoid datacenter IPs and headless flags that trip Coupang anti-bot
- Wait and retry if the block is transient rate-limiting
Example fix
// before coupang auth verify coupang # AuthRequiredError: Access Denied — anti-bot or non-KR IP // after # route Chrome through a KR residential proxy, then coupang auth verify coupang
Defensive patterns
Strategy: try-catch
Validate before calling
// probe mypage reachability before verify
const res = await fetch('https://www.coupang.com/np/mypage', { redirect: 'manual' });
if (res.status === 403 || /Access Denied/i.test(await res.text().catch(() => ''))) {
throw new Error('Coupang blocking this IP — use a KR/residential proxy');
} Type guard
function isAuthProbe(probe) {
return probe != null && typeof probe === 'object' &&
probe.kind === 'auth' && typeof probe.detail === 'string';
} Try / catch
try {
const identity = await coupangVerify(page);
} catch (err) {
if (err instanceof AuthRequiredError) {
if (/Access Denied/.test(err.message)) {
proxy.rotateToKRResidential(); // geo/anti-bot block
} else {
await coupangLogin(page); // redirected to login
}
return coupangVerify(page);
}
throw err;
} Prevention
- Use residential/KR IPs; avoid datacenter ranges that trip Coupang anti-bot
- Re-login when cookies pass the check but the server rejects the session
- Monitor Coupang mypage markup; update name selectors when classes change
- Avoid headless browser flags that raise bot-detection scores
When it happens
Trigger: Session cookies exist but are expired/invalid so mypage redirects to login; anti-bot 'Access Denied' page; mypage markup changed and selectors (.my-nickname, .member-name, .mp-user-info-name, [class*=memberName]) match nothing.
Common situations: Running verification from a datacenter/non-KR IP triggering Coupang's geo/anti-bot block; stale cookies passing the cookie check but rejected server-side; Coupang redesign changing nickname element classes; headless fingerprint detected.
Related errors
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/a533cc3448b96d4f.
Report an issue: GitHub.