{"record":{"id":"ba3b4e2c669b180a","repo":"FlowiseAI/Flowise","slug":"no-relative-links-found-ba3b4e","errorCode":null,"errorMessage":"No relative links found","messagePattern":"No relative links found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/components/nodes/documentloaders/Puppeteer/Puppeteer.ts","lineNumber":277,"sourceCode":"            }\n        }\n\n        let docs: Document[] = []\n        if (relativeLinksMethod) {\n            if (process.env.DEBUG === 'true') options.logger.info(`[${orgId}]: Start PuppeteerWebBaseLoader ${relativeLinksMethod}`)\n            // if limit is 0 we don't want it to default to 10 so we check explicitly for null or undefined\n            // so when limit is 0 we can fetch all the links\n            if (limit === null || limit === undefined) limit = 10\n            else if (limit < 0) throw new Error('Limit cannot be less than 0')\n            const pages: string[] =\n                selectedLinks && selectedLinks.length > 0\n                    ? selectedLinks.slice(0, limit === 0 ? undefined : limit)\n                    : relativeLinksMethod === 'webCrawl'\n                    ? await webCrawl(url, limit)\n                    : await xmlScrape(url, limit)\n            if (process.env.DEBUG === 'true')\n                options.logger.info(`[${orgId}]: PuppeteerWebBaseLoader pages: ${JSON.stringify(pages)}, length: ${pages.length}`)\n            if (!pages || pages.length === 0) throw new Error('No relative links found')\n            for (const page of pages) {\n                const result = await puppeteerLoader(page)\n                if (result) {\n                    docs.push(...result)\n                }\n            }\n            if (process.env.DEBUG === 'true') options.logger.info(`[${orgId}]: Finish PuppeteerWebBaseLoader ${relativeLinksMethod}`)\n        } else if (selectedLinks && selectedLinks.length > 0) {\n            if (process.env.DEBUG === 'true')\n                options.logger.info(\n                    `[${orgId}]: PuppeteerWebBaseLoader pages: ${JSON.stringify(selectedLinks)}, length: ${selectedLinks.length}`\n                )\n            for (const page of selectedLinks.slice(0, limit)) {\n                const result = await puppeteerLoader(page)\n                if (result) {\n                    docs.push(...result)\n                }\n            }","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/documentloaders/Puppeteer/Puppeteer.ts#L259-L295","documentation":"Puppeteer loader equivalent of [172]: thrown when webCrawl/xmlScrape/selectedLinks produced zero pages to scrape.","triggerScenarios":"webCrawl found no same-domain anchors; sitemap.xml empty/missing; selectedLinks empty after filtering; target is a JS SPA with no static links.","commonSituations":"SPA sites; disabled/missing sitemap; crawler blocked; selectedLinks input not wired.","solutions":["Confirm the seed page's static HTML contains links.","Verify sitemap.xml for xmlScrape.","Point the seed at a hub/listing page, not a leaf.","Provide selectedLinks explicitly.","Fall back to scraping the seed URL directly."],"exampleFix":"// before\nif (!pages || pages.length === 0) throw new Error('No relative links found')\n// after\nif (!pages || pages.length === 0) {\n  options.logger.warn(`[${orgId}]: No relative links at ${url}; scraping seed only`)\n  const seedDoc = await puppeteerLoader(url)\n  if (seedDoc) docs.push(...seedDoc)\n}","handlingStrategy":"fallback","validationCode":"async function seedHasLinks(url) {\n  const html = await (await fetch(url)).text()\n  return /<a\\s+[^>]*href=/i.test(html)\n}","typeGuard":null,"tryCatchPattern":"let pages = relativeLinksMethod === 'webCrawl' ? await webCrawl(url, limit) : await xmlScrape(url, limit)\nif (!pages || pages.length === 0) {\n  const seedDoc = await puppeteerLoader(url)\n  if (seedDoc) docs.push(...seedDoc)\n}","preventionTips":["Seed webCrawl at a page that lists links.","Confirm sitemap.xml for xmlScrape.","Provide selectedLinks when discovery is unreliable.","Render the page (Puppeteer) before harvesting links for SPAs."],"tags":["puppeteer","web-crawl","scraping","sitemap","empty-result"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}