{"record":{"id":"36cfd7b94ba4fe32","repo":"GoogleChrome/lighthouse","slug":"unexpected-file-run-name-encountered","errorCode":null,"errorMessage":"Unexpected file \"${run.name}\" encountered","messagePattern":"Unexpected file \"(.+?)\" encountered","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/scripts/gcp-collection/analyze-lhr-data.js","lineNumber":44,"sourceCode":".filter(dirent => dirent.isDirectory());\n\nconst passSet = new Set();\nconst failSet = new Set();\nconst runResults = [];\n\nfor (const dir of urlDirs) {\n  const url = dir.name;\n  const path = join(directory, url);\n  const runs = readdirSync(path, {withFileTypes: true});\n  const entry = {\n    url,\n    /** @type {Array<any>} */\n    runs: [],\n  };\n  for (const run of runs) {\n    if (run.name === '.DS_Store') continue;\n\n    if (!run.isDirectory()) throw new Error(`Unexpected file \"${run.name}\" encountered`);\n\n    const lhrPath = join(path, run.name, 'lhr.json');\n    const data = readFileSync(lhrPath, 'utf8');\n\n    /** @type {LH.Result | undefined} */\n    let lhrData;\n    try {\n      lhrData = JSON.parse(data);\n    } catch (error) {\n      console.error('Error parsing: ' + url);\n    }\n\n    if (!lhrData) continue;\n\n    const auditResult = lhrData.audits[audit].score;\n    if (!auditResult) {\n      failSet.add(url);\n    }","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/scripts/gcp-collection/analyze-lhr-data.js#L26-L62","documentation":"Error \"Unexpected file \"${run.name}\" encountered\" thrown in GoogleChrome/lighthouse.","triggerScenarios":"Raised when the analyze-lhr-data script finds a file in the LHR directory that is not an expected run file.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}