{"record":{"id":"8b6840c0ce029749","repo":"jackwener/OpenCLI","slug":"linkedin-people-search-navigation-failed-error","errorCode":null,"errorMessage":"LinkedIn people search navigation failed: ${error?.message || error}","messagePattern":"LinkedIn people search navigation failed: (.+?)","errorType":"error_code","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/linkedin/people-search.js","lineNumber":199,"sourceCode":"    description: 'Search standard LinkedIn (not Sales Navigator) for people by keyword. Each invocation consumes against LinkedIn\\'s monthly Commercial Use Limit on people search; throttle accordingly.',\n    domain: LINKEDIN_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    args: [\n        { name: 'keywords', type: 'string', required: true, positional: true, help: 'People search keywords, e.g. \"site reliability engineer berlin\"' },\n        { name: 'limit', type: 'int', default: 5, help: `Maximum people to return (1-${MAX_LIMIT}); each query counts toward LinkedIn's monthly CUL` },\n    ],\n    columns: ['rank', 'name', 'headline', 'location', 'profile_url'],\n    func: async (page, args) => {\n        if (!page) throw new CommandExecutionError('Browser session required for linkedin people-search');\n        const keywords = requireStringArg(args, 'keywords', '--keywords');\n        const limit = parseLimit(args.limit);\n\n        try {\n            await page.goto(buildSearchUrl(keywords));\n            await page.wait(6);\n        } catch (error) {\n            throw new CommandExecutionError(`LinkedIn people search navigation failed: ${error?.message || error}`);\n        }\n\n        let cookies;\n        try {\n            cookies = await page.getCookies({ url: 'https://www.linkedin.com' });\n        } catch (error) {\n            throw new CommandExecutionError(`LinkedIn cookie lookup failed: ${error?.message || error}`);\n        }\n        if (!Array.isArray(cookies)) {\n            throw new CommandExecutionError('LinkedIn cookie lookup returned malformed payload');\n        }\n        const jsession = cookies.find((c) => c.name === 'JSESSIONID')?.value;\n        if (!jsession) {\n            throw new AuthRequiredError(LINKEDIN_DOMAIN, 'LinkedIn JSESSIONID cookie not found. Please sign in to LinkedIn in the browser.');\n        }\n\n        let result;\n        try {","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/linkedin/people-search.js#L181-L217","documentation":"After building the LinkedIn people-search URL, the command navigates with page.goto and waits ~6 seconds for the page to settle. Any navigation error (network failure, timeout, DNS error, ERR_ABORTED, redirect loop) is caught and rethrown as CommandExecutionError prefixed with 'LinkedIn people search navigation failed:'.","triggerScenarios":"page.goto(buildSearchUrl(keywords)) or page.wait(6) throws — network outage, navigation timeout, LinkedIn blocking/timing out the request, invalid characters in keywords producing a bad URL, or the browser tab closing mid-navigation.","commonSituations":"No internet/VPN/DNS issues; corporate proxy blocking linkedin.com; slow connection exceeding the goto timeout; LinkedIn throttling or resetting the connection; keywords containing characters that break the URL encoding.","solutions":["Check network connectivity / proxy settings and retry","Increase the navigation timeout in the underlying page.goto wrapper if on a slow connection","Sanitize/quote the keywords argument so the search URL is well-formed","Retry later — LinkedIn may be rate-limiting or temporarily blocking your IP","Catch CommandExecutionError and surface error.message for the underlying cause"],"exampleFix":"// before: raw keywords break URL\nawait cli('linkedin people-search', { keywords: 'sre \"berlin\" & more' });\n// after: sanitized keywords\nawait cli('linkedin people-search', { keywords: 'sre berlin more' });","handlingStrategy":"retry","validationCode":"const keywords = String(args.keywords || '').trim();\nif (!keywords || /[^\\p{L}\\p{N}\\s'\"-]/u.test(keywords)) throw new Error('keywords must be plain text for the search URL');\nif (typeof navigator !== 'undefined' && !navigator.onLine) throw new Error('offline: navigation would fail');","typeGuard":"null","tryCatchPattern":"try { await gotoWithRetry(page, buildSearchUrl(keywords), 2); }\ncatch (e) { if (isTransientNavError(e)) await sleep(5000); else throw e; }","preventionTips":["Check network/proxy reachability to linkedin.com before batch runs","Sanitize keywords before building the URL","Set generous navigation timeouts on slow connections","Back off and retry once on transient navigation errors"],"tags":["network","navigation","linkedin","timeout"],"backgroundTag":"navigation-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}