{"record":{"id":"e7ce3cf9c1f4d527","repo":"remotion-dev/remotion","slug":"emitting-artifacts-is-not-supported-in-cloud-run","errorCode":null,"errorMessage":"Emitting artifacts is not supported in Cloud Run","messagePattern":"Emitting artifacts is not supported in Cloud Run","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cloudrun/src/functions/render-media-single-thread.ts","lineNumber":134,"sourceCode":"\t\t};\n\n\t\tres.writeHead(200, {'Content-Type': 'text/html'});\n\n\t\tconst actualChromiumOptions: Required<ChromiumOptions> = {\n\t\t\t...body.chromiumOptions,\n\t\t\tignoreCertificateErrors:\n\t\t\t\tbody.chromiumOptions?.ignoreCertificateErrors ?? false,\n\t\t\tdisableWebSecurity: body.chromiumOptions?.disableWebSecurity ?? false,\n\t\t\theadless: body.chromiumOptions?.headless ?? true,\n\t\t\tuserAgent: body.chromiumOptions?.userAgent ?? null,\n\t\t\tdarkMode: body.chromiumOptions?.darkMode ?? false,\n\t\t\t// Override the `null` value, which might come from CLI with swANGLE\n\t\t\tgl: body.chromiumOptions?.gl ?? 'swangle',\n\t\t\tenableMultiProcessOnLinux: true,\n\t\t};\n\n\t\tconst onArtifact: OnArtifact = () => {\n\t\t\tthrow new Error('Emitting artifacts is not supported in Cloud Run');\n\t\t};\n\n\t\tawait RenderInternals.internalRenderMedia({\n\t\t\tcomposition: {\n\t\t\t\t...composition,\n\t\t\t\theight: body.forceHeight ?? composition.height,\n\t\t\t\twidth: body.forceWidth ?? composition.width,\n\t\t\t\tfps: body.forceFps ?? composition.fps,\n\t\t\t\tdurationInFrames:\n\t\t\t\t\tbody.forceDurationInFrames ?? composition.durationInFrames,\n\t\t\t},\n\t\t\tserveUrl: body.serveUrl,\n\t\t\tcodec: body.codec,\n\t\t\toutputLocation: tempFilePath,\n\t\t\tserializedInputPropsWithCustomSchema:\n\t\t\t\tbody.serializedInputPropsWithCustomSchema,\n\t\t\tserializedResolvedPropsWithCustomSchema:\n\t\t\t\tNoReactInternals.serializeJSONWithSpecialTypes({","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/functions/render-media-single-thread.ts#L116-L152","documentation":"Thrown server-side by renderMediaSingleThread() if the render process tries to emit an artifact (e.g., a separate audio or image asset). Cloud Run rendering does not support artifact emission; the onArtifact callback is wired to throw immediately.","triggerScenarios":"A renderMedia request includes options or a composition that triggers artifact emission (e.g., separateAudioTo, image-sequence artifacts), causing the onArtifact handler to fire on the server.","commonSituations":"Passing separateAudioTo or enabling artifact-generating options that work locally but are unsupported on Cloud Run.","solutions":["Remove separateAudioTo and any artifact-emitting options from renderMediaOnCloudRun input.","Render locally with renderMedia() if you need artifact emission.","Separate audio in a post-processing step after the Cloud Run render completes."],"exampleFix":"// before\nawait renderMediaOnCloudRun({separateAudioTo: 'audio.wav', ...});\n// after\nawait renderMediaOnCloudRun({...}); // omit separateAudioTo","handlingStrategy":"validation","validationCode":"if (opts.separateAudioTo !== undefined || opts.onArtifact) {\n  throw new Error('Artifacts / separateAudioTo are not supported on Cloud Run');\n}\nawait renderMediaOnCloudRun(opts);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Strip separateAudioTo and artifact-related options before Cloud Run renders.","Perform audio separation as a post-render step locally."],"tags":["cloudrun","gcp","render","artifacts","unsupported"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}