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

  1. Open Chrome, log into Coupang, then rerun the command
  2. Point the CLI at the Chrome profile that has the Coupang session
  3. Verify cookies were not cleared and are not being blocked
  4. 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

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


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/1472340ee8cef0c5. Report an issue: GitHub.