{"record":{"id":"9596c74229cf7e91","repo":"remotion-dev/remotion","slug":"should-not-download-a-browser-in-cloud-run","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/helpers/get-composition-from-body.ts","lineNumber":30,"sourceCode":"\t\t\t},\n\t\t\tenvVariables: body.envVariables ?? {},\n\t\t\tid: body.composition,\n\t\t\tindent: false,\n\t\t\tserializedInputPropsWithCustomSchema:\n\t\t\t\tbody.serializedInputPropsWithCustomSchema,\n\t\t\tlogLevel: body.logLevel,\n\t\t\tonBrowserLog: () => null,\n\t\t\tport: null,\n\t\t\tpuppeteerInstance: undefined,\n\t\t\tserver: undefined,\n\t\t\ttimeoutInMilliseconds:\n\t\t\t\tbody.delayRenderTimeoutInMilliseconds ??\n\t\t\t\tRenderInternals.DEFAULT_TIMEOUT,\n\t\t\toffthreadVideoCacheSizeInBytes: body.offthreadVideoCacheSizeInBytes,\n\t\t\toffthreadVideoThreads: body.offthreadVideoThreads,\n\t\t\tbinariesDirectory: null,\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\tonServeUrlVisited: () => undefined,\n\t\t\tchromeMode: 'headless-shell',\n\t\t\tmediaCacheSizeInBytes: body.mediaCacheSizeInBytes,\n\t\t},\n\t);\n\n\tif (propsSize > 10_000_000) {\n\t\tRenderInternals.Log.warn(\n\t\t\t{indent: false, logLevel: body.logLevel},\n\t\t\t`The props of your composition are large (${propsSize} bytes). This may cause slowdown.`,\n\t\t);\n\t}\n\n\treturn metadata;\n};\n","sourceCodeStart":12,"sourceCodeEnd":47,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/functions/helpers/get-composition-from-body.ts#L12-L47","documentation":"Thrown inside getCompositionFromBody() when the headless browser attempts to download its binary on Cloud Run. Remotion Cloud Run services ship with a pre-installed browser, so a download request indicates the bundle/serve URL is misconfigured or the browser binary is missing from the image.","triggerScenarios":"The onBrowserDownload callback fires while opening a puppeteer instance to extract the composition from the serve URL, meaning the system tried to fetch a Chromium binary instead of using the bundled one.","commonSituations":"A custom serve URL pointing to an environment without the bundled browser, a corrupted deployment image, or a serve URL that triggers a different code path expecting a download.","solutions":["Redeploy the Cloud Run service to ensure the bundled browser is present.","Verify the serveUrl points to a Remotion bundle compatible with the deployed service version.","Do not override browser configuration on Cloud Run; rely on the pre-bundled headless-shell."],"exampleFix":"// no user code fix; this is a server-side invariant\n// redeploy: npx remotion cloudrun services deploy --memory=2Gi --region=us-central1","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always deploy services with the standard deploy command so the bundled browser is present.","Do not override browser paths or bundle locations on Cloud Run.","Redeploy if you suspect image corruption."],"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"}