jackwener/OpenCLI · warning · EmptyResultError

No Indeed jobs matched "${query}"${location ? ` in ${locatio

Error message

No Indeed jobs matched "${query}"${location ? ` in ${location}` : ''}

What it means

An EmptyResultError thrown when the search page loaded fine (ready) but zero job cards were extracted — Indeed genuinely returned no results for the query/location combination.

Source

Thrown at clis/indeed/search.js:106

                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. Broaden the search query — use fewer, more generic keywords
  2. Simplify or remove the location parameter, or use a major-city name
  3. Check query spelling and try the English term if searching non-English
  4. Reduce extra filters (remote-only, age, radius) if applied
  5. Confirm on indeed.com in a browser that the same search really yields results
Defensive patterns

Strategy: fallback

Validate before calling

const q = query.trim();
if (!q) throw new Error('Query must not be empty');
// prefer broad keywords; check location against Indeed-recognized city names

Try / catch

try {
  const rows = await indeed.search({ query, location });
} catch (e) {
  if (e instanceof EmptyResultError || /No Indeed jobs matched/.test(e.message)) {
    // fall back to a broader query or empty result handling
  }
  throw e;
}

Prevention

When it happens

Trigger: cards.ready is true, no challenge, but the cards array is empty or not an array, producing list.length === 0 for the given query and optional location.

Common situations: Overly specific query terms; misspelled keywords; location string not recognized by Indeed; query in a language/region Indeed doesn't match; filters (age, radius) too narrow; niche job title with no postings.

Related errors


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