{"record":{"id":"0bdd3a32f8b32c71","repo":"FlowiseAI/Flowise","slug":"no-relative-links-found-0bdd3a","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/Playwright/Playwright.ts","lineNumber":283,"sourceCode":"            }\n        }\n\n        let docs: Document[] = []\n        if (relativeLinksMethod) {\n            if (process.env.DEBUG === 'true') options.logger.info(`[${orgId}]: Start PlaywrightWebBaseLoader ${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}]: PlaywrightWebBaseLoader 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 playwrightLoader(page)\n                if (result) {\n                    docs.push(...result)\n                }\n            }\n            if (process.env.DEBUG === 'true') options.logger.info(`[${orgId}]: Finish PlaywrightWebBaseLoader ${relativeLinksMethod}`)\n        } else if (selectedLinks && selectedLinks.length > 0) {\n            if (process.env.DEBUG === 'true')\n                options.logger.info(\n                    `[${orgId}]: PlaywrightWebBaseLoader pages: ${JSON.stringify(selectedLinks)}, length: ${selectedLinks.length}`\n                )\n            for (const page of selectedLinks.slice(0, limit)) {\n                const result = await playwrightLoader(page)\n                if (result) {\n                    docs.push(...result)\n                }\n            }","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/documentloaders/Playwright/Playwright.ts#L265-L301","documentation":"Thrown by the Playwright loader when a relative-links crawl (webCrawl or xmlScrape) or provided selectedLinks yields zero pages. The crawl helpers returned an empty array, meaning no usable links were discovered from the seed URL.","triggerScenarios":"webCrawl found no same-domain links (JS-rendered SPA with no anchor tags in the static HTML); xmlScrape fetched sitemap.xml but it was empty, missing, or returned an error page; selectedLinks array was empty after filtering.","commonSituations":"Target site is a JS SPA whose links only render at runtime (Playwright scrape may still work but the link harvest runs on static HTML); robots.txt or sitemap.xml disabled; site blocks the crawler; selectedLinks input not wired up.","solutions":["Verify the seed URL actually contains anchor tags in its served HTML (view-source).","For xmlScrape, confirm /sitemap.xml exists and lists URLs.","For webCrawl, ensure the seed page is the one that lists child links (not a leaf).","Provide selectedLinks explicitly if auto-discovery finds nothing.","Raise the limit / check that the site is reachable and not blocking the request."],"exampleFix":"// before\nconst pages = relativeLinksMethod === 'webCrawl' ? await webCrawl(url, limit) : await xmlScrape(url, limit)\nif (!pages || pages.length === 0) throw new Error('No relative links found')\n// after - fall back to scraping the seed itself\nif (!pages || pages.length === 0) {\n  options.logger.warn(`[${orgId}]: No relative links found at ${url}; scraping seed only`)\n  const seedDoc = await playwrightLoader(url)\n  if (seedDoc) docs.push(...seedDoc)\n}","handlingStrategy":"fallback","validationCode":"// Probe whether the seed has crawlable links before committing\nasync 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  // fall back to scraping the seed itself rather than aborting\n  const seedDoc = await playwrightLoader(url)\n  if (seedDoc) docs.push(...seedDoc)\n}","preventionTips":["Point webCrawl at a hub/listing page that contains links.","Verify sitemap.xml exists before using xmlScrape.","Provide selectedLinks explicitly when discovery is unreliable.","Render the page (Playwright) before harvesting links for SPAs."],"tags":["playwright","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"}