GoogleChrome/lighthouse · error
Unexpected file "${run.name}" encountered
Error message
Unexpected file "${run.name}" encountered What it means
Error "Unexpected file "${run.name}" encountered" thrown in GoogleChrome/lighthouse.
Source
Thrown at core/scripts/gcp-collection/analyze-lhr-data.js:44
.filter(dirent => dirent.isDirectory());
const passSet = new Set();
const failSet = new Set();
const runResults = [];
for (const dir of urlDirs) {
const url = dir.name;
const path = join(directory, url);
const runs = readdirSync(path, {withFileTypes: true});
const entry = {
url,
/** @type {Array<any>} */
runs: [],
};
for (const run of runs) {
if (run.name === '.DS_Store') continue;
if (!run.isDirectory()) throw new Error(`Unexpected file "${run.name}" encountered`);
const lhrPath = join(path, run.name, 'lhr.json');
const data = readFileSync(lhrPath, 'utf8');
/** @type {LH.Result | undefined} */
let lhrData;
try {
lhrData = JSON.parse(data);
} catch (error) {
console.error('Error parsing: ' + url);
}
if (!lhrData) continue;
const auditResult = lhrData.audits[audit].score;
if (!auditResult) {
failSet.add(url);
}View on GitHub (pinned to 9515cd4e58)
Solutions
- Remove the unexpected file from the LHR directory, or rename it to the expected numeric run-file format.
- Make sure the directory only contains Lighthouse result files produced by the collection script.
When it happens
Trigger: Raised when the analyze-lhr-data script finds a file in the LHR directory that is not an expected run file.
Common situations: See trigger scenarios.
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/36cfd7b94ba4fe32.
Report an issue: GitHub.