jackwener/OpenCLI · error · CommandExecutionError
coupang search wait failed: ${error?.message || error}
Error message
coupang search wait failed: ${error?.message || error} What it means
CommandExecutionError wrapping any rejection of the 3-second post-filter page.wait(3) call during a filtered Coupang search. It signals the browser-level wait operation itself failed (not a timeout of business logic but an API error).
Source
Thrown at clis/coupang/search.js:439
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) => {
throw new CommandExecutionError(`coupang search filtered navigation failed: ${error?.message || error}`);
});
}
}
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}`);
});View on GitHub (pinned to 49907e53dc)
Solutions
- Rerun the search with a stable, open browser session
- Remove --filter to skip the wait path
- Check browser/process stability and network connectivity
- Wrap the wait in a catch that tolerates wait failure and continues
Example fix
// before
await page.wait(3);
// after
await page.wait(3).catch(() => {}); Defensive patterns
Strategy: retry
Try / catch
try { await run(); } catch (e) { if (/wait failed/.test(e.message)) { await run(); } else throw e; } Prevention
- Keep the browser session open for the whole command
- Avoid closing tabs or killing Chrome mid-run
- Run on a stable network connection
When it happens
Trigger: After a filter is applied, page.wait(3) rejects — typically because the page/tab was closed, navigated away, or the browser connection dropped during the wait.
Common situations: Slow connections or heavy pages causing navigation race; user closes the tab during the run; automation harness tears down the browser early.
Related errors
- Unexpected 12306 probe: ${JSON.stringify(probe)}
- ChatGPT did not create a conversation URL after sending the
- ChatWise response
- Could not switch to ${wantModel} model
- No Claude response appeared within ${timeoutSeconds}s. Re-ru
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/2875f4fb1908831f.
Report an issue: GitHub.