{"record":{"id":"5d91704a5c73fdcf","repo":"GoogleChrome/lighthouse","slug":"could-not-find-with-site-url-input-url","errorCode":null,"errorMessage":"Could not find with site URL ${INPUT_URL}","messagePattern":"Could not find with site URL (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/scripts/lantern/debug-url.js","lineNumber":25,"sourceCode":"\nimport path from 'path';\nimport {execFileSync} from 'child_process';\n\nimport constants from './constants.js';\nimport {LH_ROOT} from '../../../shared/root.js';\nimport {readJson} from '../../test/test-utils.js';\n\nconst INPUT_URL = process.argv[2];\nif (!INPUT_URL) throw new Error('Usage $0: <url>');\n\nconst SITE_INDEX_PATH = path.resolve(process.cwd(), constants.SITE_INDEX_WITH_GOLDEN_PATH);\nconst SITE_INDEX_DIR = path.dirname(SITE_INDEX_PATH);\nconst RUN_ONCE_PATH = path.join(LH_ROOT, 'core/scripts/lantern/run-once.js');\n\nconst siteIndex = readJson(SITE_INDEX_PATH);\n// @ts-expect-error - over-aggressive implicit any on site\nconst site = siteIndex.sites.find(site => site.url === INPUT_URL);\nif (!site) throw new Error(`Could not find with site URL ${INPUT_URL}`);\n\nconst trace = path.join(SITE_INDEX_DIR, site.unthrottled.tracePath);\nconst log = path.join(SITE_INDEX_DIR, site.unthrottled.devtoolsLogPath);\nprocess.env.LANTERN_DEBUG = 'true';\nexecFileSync('node', ['--inspect-brk', RUN_ONCE_PATH, trace, log], {stdio: 'inherit'});\n","sourceCodeStart":7,"sourceCodeEnd":31,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/scripts/lantern/debug-url.js#L7-L31","documentation":"Thrown by debug-url.js after reading the golden site index JSON. The script searches for the provided URL in siteIndex.sites by exact match on the url field. If no site entry has that exact URL, it cannot locate the corresponding trace and devtools log files needed for the debug run.","triggerScenarios":"Running `node debug-url.js <url>` where <url> does not exactly match any site.url in ./lantern-data/site-index-plus-golden-expectations.json. The find() at line 24 returns undefined.","commonSituations":"URL typo or copy error. Trailing slash mismatch (https://example.com vs https://example.com/). http vs https protocol difference. The site was removed from the golden index in a newer version. www prefix mismatch. URL encoding differences.","solutions":["Inspect the site index JSON to find valid URLs: examine ./lantern-data/site-index-plus-golden-expectations.json and copy the exact url string","Ensure exact string match including protocol, trailing slash, and www prefix","If the URL should be there, verify you're using the correct site index file (resolved from cwd via constants.SITE_INDEX_WITH_GOLDEN_PATH)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const siteIndex = readJson(SITE_INDEX_PATH);\nconst validUrls = siteIndex.sites.map(s => s.url);\nconst site = siteIndex.sites.find(s => s.url === INPUT_URL);\nif (!site) {\n  console.error(`URL not found. Valid URLs include: ${validUrls.slice(0, 5).join(', ')}...`);\n  process.exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy the exact URL string from the site index JSON","Verify protocol, trailing slash, and www prefix match exactly","List valid URLs from the site index before guessing"],"tags":["cli","lantern","site-index","url-mismatch"],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}