{"record":{"id":"d09e6a5359d97d96","repo":"heygen-com/hyperframes","slug":"chromium-chrome-binary-unavailable-source-sou-d09e6a","errorCode":null,"errorMessage":"[chromium] Chrome binary unavailable (source=${source}): HYPERFRAMES_LAMBDA_CHROME_PATH=${JSON.stringify(explicit)} does not exist on disk.","messagePattern":"\\[chromium\\] Chrome binary unavailable \\(source=(.+?)\\): HYPERFRAMES_LAMBDA_CHROME_PATH=(.+?) does not exist on disk\\.","errorType":"exception","errorClass":"ChromeBinaryUnavailableError","httpStatus":null,"severity":"critical","filePath":"packages/aws-lambda/src/chromium.ts","lineNumber":121,"sourceCode":"    if (!path || typeof path !== \"string\") {\n      throw new ChromeBinaryUnavailableError(source, null, SPARTICUZ_WEDGE_HINT);\n    }\n    if (!existsSync(path)) {\n      throw new ChromeBinaryUnavailableError(source, path, SPARTICUZ_WEDGE_HINT);\n    }\n    return path;\n  }\n  const explicit = process.env.HYPERFRAMES_LAMBDA_CHROME_PATH;\n  if (!explicit) {\n    throw new ChromeBinaryUnavailableError(\n      source,\n      null,\n      \"HYPERFRAMES_LAMBDA_CHROME_SOURCE=chrome-headless-shell requires \" +\n        \"HYPERFRAMES_LAMBDA_CHROME_PATH to be set to the absolute path of the bundled binary.\",\n    );\n  }\n  if (!existsSync(explicit)) {\n    throw new ChromeBinaryUnavailableError(\n      source,\n      explicit,\n      `HYPERFRAMES_LAMBDA_CHROME_PATH=${JSON.stringify(explicit)} does not exist on disk.`,\n    );\n  }\n  return explicit;\n}\n\n/**\n * Resolve the Chromium launch args for the selected source. For\n * `@sparticuz/chromium` we forward `chromium.args` (Lambda-tuned defaults\n * — single-process, no-sandbox, /tmp paths). For the shell fallback the\n * engine's own arg builder owns it; we return an empty array so the\n * engine's defaults apply.\n */\nexport async function resolveChromeArgs(): Promise<string[]> {\n  if (resolveChromeSource() !== \"sparticuz\") return [];\n  const mod = await loadSparticuzChromium();","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/aws-lambda/src/chromium.ts#L103-L139","documentation":"A `ChromeBinaryUnavailableError` thrown when the chrome-headless-shell source is configured and `HYPERFRAMES_LAMBDA_CHROME_PATH` is set, but the referenced path does not exist on disk. The hint echoes the offending path (JSON-stringified) so the operator can spot quoting/leading-space errors in the env var.","triggerScenarios":"`resolveChromeExecutablePath()` with `HYPERFRAMES_LAMBDA_CHROME_PATH` set to a path that `existsSync` reports missing — wrong path, binary not bundled into the zip, or a path with stray whitespace/quotes from env interpolation.","commonSituations":"build-zip.ts placed the binary at a different path than the env var; `HYPERFRAMES_LAMBDA_CHROME_PATH` wrapped in literal quotes that became part of the value; deploying a different architecture zip (arm64 vs x86_64) where the binary path differs.","solutions":["Inspect the value echoed in the message for stray quotes, spaces, or a relative path; it must be absolute.","Re-build the zip and confirm the binary is present at the configured path (unzip and `ls` /var/task/bin).","Match the binary's architecture to the Lambda's `arch` setting (x86_64 vs arm64).","Use `aws lambda update-function-code --zip-file` to deploy a corrected bundle."],"exampleFix":"# before\nHYPERFRAMES_LAMBDA_CHROME_PATH=\"/var/task/chrome-headless-shell\"  # quotes leak into value\n# after\nHYPERFRAMES_LAMBDA_CHROME_PATH=/var/task/bin/chrome-headless-shell","handlingStrategy":"validation","validationCode":"import { existsSync } from \"node:fs\";\nfunction assertChromePathExists(): void {\n  const p = process.env.HYPERFRAMES_LAMBDA_CHROME_PATH;\n  if (p && !existsSync(p)) {\n    throw new Error(`HYPERFRAMES_LAMBDA_CHROME_PATH does not exist: ${JSON.stringify(p)}`);\n  }\n}\n// run before resolveChromeExecutablePath","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set HYPERFRAMES_LAMBDA_CHROME_PATH to an absolute path with no surrounding quotes.","After building the zip, unzip it and `ls` the binary path to confirm it bundled.","Match the binary architecture (x86_64/arm64) to the Lambda arch setting.","Add a post-build CI step that asserts the path exists in the artifact."],"tags":["chromium","lambda","configuration","filesystem","browser"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}