jackwener/OpenCLI · error · CommandExecutionError

Indeed search page did not expose result or empty-state mark

Error message

Indeed search page did not expose result or empty-state markers within 15s

What it means

Thrown when the search page never exposes result cards or the empty-state markers within the 15s polling window (cards.ready stays falsy). The library could not determine whether results exist because neither marker appeared in time.

Source

Thrown at clis/indeed/search.js:101

                        location: b.querySelector('[data-testid="text-location"]')?.textContent?.trim() ?? '',
                        salary: b.querySelector('.salary-snippet-container span')?.textContent?.trim() ?? '',
                        tags,
                    });
                }
                const blockedHeadline = document.title || '';
                const challenge = blockedHeadline.includes('Just a moment') || !!document.querySelector('[id^="cf-"]');
                return { cards: out, challenge, ready };
            })()`);
        }
        catch (e) {
            throw new CommandExecutionError(`Failed to scrape Indeed search DOM: ${e?.message ?? e}`, 'The page may not have fully loaded; try again.');
        }

        if (cards?.challenge) {
            throw new CommandExecutionError('Indeed served a Cloudflare challenge page', 'Open https://www.indeed.com in the connected browser and clear the challenge, then retry.');
        }
        if (!cards?.ready) {
            throw new CommandExecutionError('Indeed search page did not expose result or empty-state markers within 15s', 'Indeed may still be loading or the DOM shape may have changed; retry after opening Indeed in the connected browser.');
        }

        const list = Array.isArray(cards?.cards) ? cards.cards : [];
        if (list.length === 0) {
            throw new EmptyResultError('indeed search', `No Indeed jobs matched "${query}"${location ? ` in ${location}` : ''}`);
        }
        return list.slice(0, limit).map((c, i) => searchCardToRow(c, start + i + 1));
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Retry the search; transient slowness resolves on a fresh attempt
  2. Open the search URL in the connected browser and confirm it renders, then retry
  3. Increase the readiness timeout beyond 15s for slow networks
  4. Restart or refresh the connected browser session
  5. If persistent, check Indeed's DOM for changed result/empty-state markers and update the scraper
Defensive patterns

Strategy: retry

Validate before calling

const res = await page.goto(searchUrl, { waitUntil: 'domcontentloaded', timeout: 30000 });
if (!res || res.status() >= 400) throw new Error('Search URL not reachable');

Try / catch

try {
  const rows = await indeed.search({ query, location });
} catch (e) {
  if (e.message.includes('within 15s')) {
    // retry once after a delay; escalate if it repeats
  }
  throw e;
}

Prevention

When it happens

Trigger: After the challenge check on the search page, cards?.ready is false — neither result containers nor the known empty-state DOM rendered within the timeout.

Common situations: Slow network keeping the page in loading state; Indeed markup change removed readiness markers; page stuck on spinner; connected browser busy with another navigation.

Related errors


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