{"record":{"id":"fe63e94698d9a850","repo":"jackwener/OpenCLI","slug":"indeed-served-a-cloudflare-challenge-page-fe63e9","errorCode":null,"errorMessage":"Indeed served a Cloudflare challenge page","messagePattern":"Indeed served a Cloudflare challenge page","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/indeed/search.js","lineNumber":98,"sourceCode":"                        jk,\n                        title: b.querySelector('h2.jobTitle span')?.textContent?.trim() ?? '',\n                        company: b.querySelector('[data-testid=\"company-name\"]')?.textContent?.trim() ?? '',\n                        location: b.querySelector('[data-testid=\"text-location\"]')?.textContent?.trim() ?? '',\n                        salary: b.querySelector('.salary-snippet-container span')?.textContent?.trim() ?? '',\n                        tags,\n                    });\n                }\n                const blockedHeadline = document.title || '';\n                const challenge = blockedHeadline.includes('Just a moment') || !!document.querySelector('[id^=\"cf-\"]');\n                return { cards: out, challenge, ready };\n            })()`);\n        }\n        catch (e) {\n            throw new CommandExecutionError(`Failed to scrape Indeed search DOM: ${e?.message ?? e}`, 'The page may not have fully loaded; try again.');\n        }\n\n        if (cards?.challenge) {\n            throw new CommandExecutionError('Indeed served a Cloudflare challenge page', 'Open https://www.indeed.com in the connected browser and clear the challenge, then retry.');\n        }\n        if (!cards?.ready) {\n            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.');\n        }\n\n        const list = Array.isArray(cards?.cards) ? cards.cards : [];\n        if (list.length === 0) {\n            throw new EmptyResultError('indeed search', `No Indeed jobs matched \"${query}\"${location ? ` in ${location}` : ''}`);\n        }\n        return list.slice(0, limit).map((c, i) => searchCardToRow(c, start + i + 1));\n    },\n});\n","sourceCodeStart":80,"sourceCodeEnd":111,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/indeed/search.js#L80-L111","documentation":"Thrown when the Indeed search page is detected as a Cloudflare challenge page ('Just a moment' title or cf-* elements). The CLI detects and surfaces this instead of returning empty or broken results.","triggerScenarios":"cards.challenge is true after evaluating the search page DOM.","commonSituations":"Flagged IP (VPN/datacenter/proxy); headless browser automation detected; burst of searches from one session; missing Cloudflare clearance cookies after cache clear.","solutions":["Open https://www.indeed.com in the connected browser and clear the challenge, then retry","Switch to a normal browser profile (non-headless) and a residential IP","Disable VPN/proxy or change network","Add delays between searches to reduce rate-based flagging","Browse Indeed normally once to obtain clearance cookies before scraping"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"const title = await page.title();\nif (title.includes('Just a moment') || (await page.$('[id^=\"cf-\"]'))) {\n  // clear the challenge manually in the connected browser first\n}","typeGuard":null,"tryCatchPattern":"try {\n  const rows = await indeed.search({ query, location });\n} catch (e) {\n  if (e.message.includes('Cloudflare challenge')) {\n    // pause, ask user to solve challenge in connected browser, then retry\n  }\n  throw e;\n}","preventionTips":["Use residential IPs; avoid datacenter/VPN ranges","Keep requests paced and human-like","Use a persistent, non-headless browser profile","Maintain Cloudflare clearance by browsing Indeed periodically"],"tags":["cloudflare","bot-detection","scraping","indeed"],"backgroundTag":"cloudflare-challenge-blocked","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}