{"record":{"id":"1472340ee8cef0c5","repo":"jackwener/OpenCLI","slug":"coupang-com-147234","errorCode":null,"errorMessage":"coupang.com","messagePattern":"coupang\\.com","errorType":"exception","errorClass":"AuthRequiredError","httpStatus":null,"severity":"error","filePath":"clis/coupang/search.js","lineNumber":468,"sourceCode":"            }\n        }\n        await page.autoScroll({ times: filter ? 3 : 2, delayMs: 1500 }).catch((error) => {\n            throw new CommandExecutionError(`coupang search scroll failed: ${error?.message || error}`);\n        });\n        const raw = await page.evaluate(buildSearchEvaluate(query, limit, pageNumber)).catch((error) => {\n            throw new CommandExecutionError(`coupang search extraction failed: ${error?.message || error}`);\n        });\n        const loginHints = raw?.loginHints ?? {};\n        const items = Array.isArray(raw?.items) ? raw.items : [];\n        const domItems = Array.isArray(raw?.domItems) ? raw.domItems : [];\n        const normalizedBase = sanitizeSearchItems(items.map((item, index) => normalizeSearchItem(item, index)), limit);\n        const normalizedDom = sanitizeSearchItems(domItems.map((item, index) => normalizeSearchItem(item, index)), Math.max(limit * 6, 60));\n        const normalized = filter\n            ? sanitizeSearchItems(normalizedDom, limit)\n            : mergeSearchItems(normalizedBase, normalizedDom, limit);\n        if (!normalized.length) {\n            if (loginHints.hasLoginLink && !loginHints.hasMyCoupang) {\n                throw new AuthRequiredError('coupang.com', 'Please log into Coupang in Chrome and retry.');\n            }\n            throw new EmptyResultError('coupang search', `No products matched \"${query}\". Try a more specific keyword or remove --filter.`);\n        }\n        return normalized;\n    },\n});\n","sourceCodeStart":450,"sourceCodeEnd":475,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/coupang/search.js#L450-L475","documentation":"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.","triggerScenarios":"Search completes but every extraction source is empty while loginHints.hasLoginLink is true and loginHints.hasMyCoupang is false.","commonSituations":"Chrome profile logged out of Coupang (session cookie expired); running with a fresh/incognito profile; Coupang gating results behind login for the query/region.","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"],"exampleFix":"// before\nchromeProfile: 'default'\n// after\nchromeProfile: 'personal' // profile with active Coupang login","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { const items = await coupangSearch(query); } catch (e) { if (e instanceof AuthRequiredError) { openChromeForLogin(); return retryAfterLogin(); } throw e; }","preventionTips":["Keep the Chrome profile logged into Coupang","Check session cookies haven't expired before long batch runs","Use a persistent profile rather than incognito"],"tags":["authentication","scraping","cookies"],"backgroundTag":"auth-required","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}