GoogleChrome/lighthouse · error
Could not find with site URL ${INPUT_URL}
Error message
Could not find with site URL ${INPUT_URL} What it means
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.
Source
Thrown at core/scripts/lantern/debug-url.js:25
import path from 'path';
import {execFileSync} from 'child_process';
import constants from './constants.js';
import {LH_ROOT} from '../../../shared/root.js';
import {readJson} from '../../test/test-utils.js';
const INPUT_URL = process.argv[2];
if (!INPUT_URL) throw new Error('Usage $0: <url>');
const SITE_INDEX_PATH = path.resolve(process.cwd(), constants.SITE_INDEX_WITH_GOLDEN_PATH);
const SITE_INDEX_DIR = path.dirname(SITE_INDEX_PATH);
const RUN_ONCE_PATH = path.join(LH_ROOT, 'core/scripts/lantern/run-once.js');
const siteIndex = readJson(SITE_INDEX_PATH);
// @ts-expect-error - over-aggressive implicit any on site
const site = siteIndex.sites.find(site => site.url === INPUT_URL);
if (!site) throw new Error(`Could not find with site URL ${INPUT_URL}`);
const trace = path.join(SITE_INDEX_DIR, site.unthrottled.tracePath);
const log = path.join(SITE_INDEX_DIR, site.unthrottled.devtoolsLogPath);
process.env.LANTERN_DEBUG = 'true';
execFileSync('node', ['--inspect-brk', RUN_ONCE_PATH, trace, log], {stdio: 'inherit'});
View on GitHub (pinned to 9515cd4e58)
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)
Defensive patterns
Strategy: validation
Validate before calling
const siteIndex = readJson(SITE_INDEX_PATH);
const validUrls = siteIndex.sites.map(s => s.url);
const site = siteIndex.sites.find(s => s.url === INPUT_URL);
if (!site) {
console.error(`URL not found. Valid URLs include: ${validUrls.slice(0, 5).join(', ')}...`);
process.exit(1);
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Invalid precomputed lantern data file
- Usage $0: <url>
- Usage $0 <computed summary file>
- Usage $0 <expectations file>
- Please provide a url
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/5d91704a5c73fdcf.
Report an issue: GitHub.