jackwener/OpenCLI · error · CommandExecutionError
coupang search navigation failed: ${error?.message || error}
Error message
coupang search navigation failed: ${error?.message || error} What it means
Wraps a failure of page.goto(url) when the coupang search command navigates to the Coupang search results URL (https://www.coupang.com/np/search?q=...). The underlying navigation error is rethrown as a CommandExecutionError (COMMAND_EXEC, exit 1) with a search-specific message.
Source
Thrown at clis/coupang/search.js:429
{ name: 'limit', type: 'int', default: 20, help: 'Max results (max 50)' },
{ name: 'filter', required: false, help: 'Optional search filter (currently supports: rocket)' },
],
columns: ['rank', 'product_id', 'title', 'price', 'unit_price', 'rating', 'review_count', 'rocket', 'delivery_type', 'delivery_promise', 'url'],
func: async (page, kwargs) => {
const query = String(kwargs.query || '').trim();
if (!query) {
throw new ArgumentError('query cannot be empty');
}
const pageNumber = parsePageArg(kwargs.page, 1);
const limit = parseLimitArg(kwargs.limit, 20, 50);
const filter = String(kwargs.filter || '').trim().toLowerCase();
if (filter && filter !== 'rocket') {
throw new ArgumentError(`Unsupported --filter "${filter}" (supported: rocket)`);
}
const initialPage = filter ? 1 : pageNumber;
const url = `https://www.coupang.com/np/search?q=${encodeURIComponent(query)}&channel=user&page=${initialPage}`;
await page.goto(url).catch((error) => {
throw new CommandExecutionError(`coupang search navigation failed: ${error?.message || error}`);
});
if (filter) {
const filterResult = await page.evaluate(buildApplyFilterEvaluate(filter)).catch((error) => {
throw new CommandExecutionError(`coupang search filter evaluation failed: ${error?.message || error}`);
});
if (!filterResult?.ok) {
throw new EmptyResultError('coupang search', `Filter "${filter}" was not available on the current page; try without --filter or wait for Coupang to render the filter bar.`);
}
await page.wait(3).catch((error) => {
throw new CommandExecutionError(`coupang search wait failed: ${error?.message || error}`);
});
if (pageNumber > 1) {
const locationInfo = await page.evaluate(buildCurrentLocationEvaluate()).catch((error) => {
throw new CommandExecutionError(`coupang search location evaluation failed: ${error?.message || error}`);
});
const filteredUrl = new URL(locationInfo?.href || url);
filteredUrl.searchParams.set('page', String(pageNumber));
await page.goto(filteredUrl.toString()).catch((error) => {View on GitHub (pinned to 49907e53dc)
Solutions
- Read the inner error message to distinguish timeout vs DNS vs refused.
- Confirm https://www.coupang.com/np/search?q=test loads in a normal browser from this machine.
- Ensure Chrome is running and the opencli extension/daemon is connected.
- Increase --timeout if navigation is timing out on a slow connection.
- Retry later or from a different IP if Coupang is blocking your address.
Defensive patterns
Strategy: retry
Validate before calling
// preflight connectivity
try { await fetch('https://www.coupang.com/robots.txt'); } catch { throw new Error('coupang.com unreachable from this machine'); } Type guard
function isNavigationFailure(err) { return err?.code === 'COMMAND_EXEC' && /navigation failed/.test(err.message); } Try / catch
try {
return await run('coupang search', { query });
} catch (err) {
if (isNavigationFailure(err)) {
await sleep(2000);
return await run('coupang search', { query }); // one retry for transient network issues
}
throw err;
} Prevention
- Check network/DNS before batch search runs.
- Ensure Chrome + the opencli extension are connected and the daemon is running.
- Increase --timeout on slow connections.
- If your IP is blocked/geo-restricted, run from an allowed network.
When it happens
Trigger: `opencli coupang search <query>` when page.goto fails: DNS/network failure, connection reset by Coupang, bot-blocking of /np/search, invalid characters breaking the URL (though query is encodeURIComponent'd), navigation timeout, or Chrome/extension disconnected.
Common situations: No internet or DNS issues; Coupang blocking datacenter/VPN IPs on the search endpoint; heavy query triggering anti-bot interstitial that fails navigation; corporate proxy; browser daemon not running.
Related errors
- coupang product navigation failed: ${error?.message || error
- Failed to load Booking.com search page: ${err?.message || er
- Failed to open Chess.com analysis board: ${error?.message ||
- coupang add-to-cart navigation failed: ${error?.message || e
- coupang search filtered navigation failed: ${error?.message
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/991c26607f8dfae8.
Report an issue: GitHub.