{"record":{"id":"90ebd0beedff4e77","repo":"remotion-dev/remotion","slug":"should-not-download-a-browser-in-cloud-run-90ebd0","errorCode":null,"errorMessage":"Should not download a browser in Cloud Run","messagePattern":"Should not download a browser in Cloud Run","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/cloudrun/src/functions/render-media-single-thread.ts","lineNumber":208,"sourceCode":"\t\t\tonCtrlCExit: () => undefined,\n\t\t\tonDownload: () => undefined,\n\t\t\tonStart: () => undefined,\n\t\t\toverwrite: true,\n\t\t\tport: null,\n\t\t\tpreferLossless: body.preferLossless,\n\t\t\tpuppeteerInstance: undefined,\n\t\t\tserver: undefined,\n\t\t\toffthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,\n\t\t\tmediaCacheSizeInBytes: body.mediaCacheSizeInBytes,\n\t\t\toffthreadVideoThreads: body.offthreadVideoThreads,\n\t\t\tcolorSpace: body.colorSpace,\n\t\t\trepro: false,\n\t\t\tbinariesDirectory: null,\n\t\t\tseparateAudioTo: null,\n\t\t\tforSeamlessAacConcatenation: false,\n\t\t\tcompositionStart: 0,\n\t\t\tonBrowserDownload: () => {\n\t\t\t\tthrow new Error('Should not download a browser in Cloud Run');\n\t\t\t},\n\t\t\tonArtifact,\n\t\t\tmetadata: body.metadata ?? null,\n\t\t\thardwareAcceleration: 'disable',\n\t\t\tchromeMode: 'headless-shell',\n\t\t\tonLog: RenderInternals.defaultOnLog,\n\t\t\tlicenseKey: null,\n\t\t\tisProduction: null,\n\t\t\tsampleRate: body.sampleRate ?? 48000,\n\t\t});\n\n\t\tconst storage = new Storage();\n\n\t\tconst publicUpload = body.privacy === 'public' || !body.privacy;\n\n\t\tconst uploadedResponse = await storage\n\t\t\t.bucket(body.outputBucket)\n\t\t\t.upload(tempFilePath, {","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/functions/render-media-single-thread.ts#L190-L226","documentation":"Thrown inside renderMediaSingleThread() if the headless browser used for the render attempts to download its binary. Cloud Run services bundle a headless-shell browser at deploy time, so a download attempt signals the bundled binary is missing or the browser path is misconfigured.","triggerScenarios":"The onBrowserDownload callback fires during internalRenderMedia(), meaning the system could not locate the pre-installed browser and tried to fetch one.","commonSituations":"Corrupted or misconfigured Cloud Run service image, deploying a custom image without the bundled browser, or a runtime path issue.","solutions":["Redeploy the Cloud Run service using the standard deploy command.","Avoid using custom Docker images that strip the bundled browser.","Ensure no env var overrides the browser path on the service."],"exampleFix":"// no user code fix; server-side invariant\n// redeploy the service:\n// npx remotion cloudrun services deploy --region=us-central1 --memory=2Gi","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the standard deploy command so the bundled headless-shell is present.","Do not deploy custom images that remove the browser binary.","Redeploy if renders start failing with this invariant."],"tags":["cloudrun","gcp","browser","render","invariant"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}