{"record":{"id":"7ba35e446aaeebc2","repo":"remotion-dev/remotion","slug":"emitting-artifacts-is-not-supported-in-cloud-run-7ba35e","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-still-single-thread.ts","lineNumber":112,"sourceCode":"\t\t\tlogLevel: body.logLevel,\n\t\t\tbrowserExecutable: null,\n\t\t\tcancelSignal: null,\n\t\t\tindent: false,\n\t\t\ttimeoutInMilliseconds: body.delayRenderTimeoutInMilliseconds,\n\t\t\tonBrowserLog: null,\n\t\t\tonDownload: null,\n\t\t\toverwrite: true,\n\t\t\tport: null,\n\t\t\tpuppeteerInstance: null,\n\t\t\tserver: undefined,\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\tonArtifact: () => {\n\t\t\t\tthrow new Error('Emitting artifacts is not supported in Cloud Run');\n\t\t\t},\n\t\t\tchromeMode: 'headless-shell',\n\t\t\tmediaCacheSizeInBytes: body.mediaCacheSizeInBytes,\n\t\t\tonLog: RenderInternals.defaultOnLog,\n\t\t\tlicenseKey: null,\n\t\t\tisProduction: null,\n\t\t});\n\t\tLog.info({indent: false, logLevel: body.logLevel}, 'Still rendered');\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, {\n\t\t\t\tdestination: `renders/${renderId}/${body.outName ?? 'out.png'}`,\n\t\t\t\tpredefinedAcl: publicUpload ? 'publicRead' : 'projectPrivate',","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/functions/render-still-single-thread.ts#L94-L130","documentation":"Thrown server-side by renderStillOnCloudRun() when the @remotion/renderer still-render pipeline invokes the onArtifact callback. Cloud Run's still-render configuration explicitly disables artifact emission because there is no durable, accessible artifact store wired into the single-threaded still path. Hitting this means a composition or renderer version requested artifact output that the Cloud Run environment cannot satisfy.","triggerScenarios":"The renderer's still render attempts to emit an artifact (e.g., via a render hook or a newer renderer feature that produces artifacts) and calls the onArtifact callback, which is hard-coded to throw.","commonSituations":"A composition uses an API or effect that emits artifacts (e.g., separate audio tracks, debug frames); the service image bundles a newer @remotion/renderer that defaults to artifact emission; a custom entrypoint re-enables artifacts.","solutions":["Remove or disable artifact-emitting features from the composition being rendered as a still on Cloud Run.","Redeploy the service from the matching @remotion/cloudrun version so the renderer's artifact defaults align with the disabled callback.","If artifacts are required, render locally or on Lambda instead of Cloud Run, where artifact storage is supported.","Verify no inputProps or render options inject an onArtifact/artifact-enabled flag."],"exampleFix":"// before: composition uses an artifact-emitting hook\n// useArtifact({ enabled: true });\n// after: disable artifacts before rendering the still on Cloud Run\n// (remove the hook, or render on Lambda/local where artifacts are supported)","handlingStrategy":"validation","validationCode":"// Ensure the composition does not enable artifact emission before rendering as a still on Cloud Run.\n// Artifacts are composition/option-driven; the guard is at the render layer. Document and assert your still config:\nconst stillOpts = { ...opts, // no onArtifact / artifact-enabled flags };\n","typeGuard":"function compositionEmitsArtifacts(comp: unknown): boolean {\n  // Heuristic: flag known artifact-emitting APIs in the composition source.\n  // True detection requires inspecting the bundle; treat as conservative.\n  return false;\n}","tryCatchPattern":"try {\n  await renderStillOnCloudRun(opts);\n} catch (err) {\n  if (err instanceof Error && err.message.startsWith('Emitting artifacts is not supported')) {\n    throw new Error('This composition emits artifacts, which Cloud Run stills do not support. Render on Lambda or locally.');\n  }\n  throw err;\n}","preventionTips":["Do not enable artifact-emitting features for stills rendered on Cloud Run.","Keep renderer and cloudrun package versions aligned so defaults match.","Use Lambda or local rendering when artifacts are required."],"tags":["cloudrun","artifacts","server-side","still-render"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}