jackwener/OpenCLI · error · AuthRequiredError
coupang.com
Error message
coupang.com
What it means
AuthRequiredError with domain 'coupang.com' thrown when the search returned zero normalized items AND the page shows a login link but no 'My Coupang' indicator — i.e. Coupang served a logged-out state that suppresses results.
Source
Thrown at clis/coupang/search.js:468
}
}
await page.autoScroll({ times: filter ? 3 : 2, delayMs: 1500 }).catch((error) => {
throw new CommandExecutionError(`coupang search scroll failed: ${error?.message || error}`);
});
const raw = await page.evaluate(buildSearchEvaluate(query, limit, pageNumber)).catch((error) => {
throw new CommandExecutionError(`coupang search extraction failed: ${error?.message || error}`);
});
const loginHints = raw?.loginHints ?? {};
const items = Array.isArray(raw?.items) ? raw.items : [];
const domItems = Array.isArray(raw?.domItems) ? raw.domItems : [];
const normalizedBase = sanitizeSearchItems(items.map((item, index) => normalizeSearchItem(item, index)), limit);
const normalizedDom = sanitizeSearchItems(domItems.map((item, index) => normalizeSearchItem(item, index)), Math.max(limit * 6, 60));
const normalized = filter
? sanitizeSearchItems(normalizedDom, limit)
: mergeSearchItems(normalizedBase, normalizedDom, limit);
if (!normalized.length) {
if (loginHints.hasLoginLink && !loginHints.hasMyCoupang) {
throw new AuthRequiredError('coupang.com', 'Please log into Coupang in Chrome and retry.');
}
throw new EmptyResultError('coupang search', `No products matched "${query}". Try a more specific keyword or remove --filter.`);
}
return normalized;
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Open Chrome, log into Coupang, then rerun the command
- Point the CLI at the Chrome profile that has the Coupang session
- Verify cookies were not cleared and are not being blocked
- Retry later if Coupang is enforcing region-based login walls
Example fix
// before chromeProfile: 'default' // after chromeProfile: 'personal' // profile with active Coupang login
Defensive patterns
Strategy: try-catch
Try / catch
try { const items = await coupangSearch(query); } catch (e) { if (e instanceof AuthRequiredError) { openChromeForLogin(); return retryAfterLogin(); } throw e; } Prevention
- Keep the Chrome profile logged into Coupang
- Check session cookies haven't expired before long batch runs
- Use a persistent profile rather than incognito
When it happens
Trigger: Search completes but every extraction source is empty while loginHints.hasLoginLink is true and loginHints.hasMyCoupang is false.
Common situations: Chrome profile logged out of Coupang (session cookie expired); running with a fresh/incognito profile; Coupang gating results behind login for the query/region.
Related errors
- 12306 tk auth cookie missing
- amazon.com
- Amazon review discussion requires an active signed-in Amazon
- Could not extract CSRF token from barchart.com. Make sure yo
- Bilibili ${label} API requires login or permission: ${messag
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/1472340ee8cef0c5.
Report an issue: GitHub.