{"record":{"id":"877a851235c90400","repo":"remotion-dev/remotion","slug":"version-mismatch-when-calling-rendermediaoncloudr","errorCode":null,"errorMessage":"Version mismatch: When calling renderMediaOnCloudRun(), you called a service which has the version ${VERSION} but the @remotion/cloudrun package is an older version. Deploy a new service with matchin version and use it to call renderMediaOnCloudRun().","messagePattern":"Version mismatch: When calling renderMediaOnCloudRun\\(\\), you called a service which has the version (.+?) but the @remotion/cloudrun package is an older version\\. Deploy a new service with matchin version and use it to call renderMediaOnCloudRun\\(\\)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cloudrun/src/functions/render-media-single-thread.ts","lineNumber":30,"sourceCode":"import {getCompositionFromBody} from './helpers/get-composition-from-body';\nimport {getDownloadBehaviorSetting} from './helpers/get-download-behavior-setting';\nimport type {\n\tCloudRunPayloadType,\n\tRenderMediaOnCloudrunOutput,\n} from './helpers/payloads';\nimport {writeCloudrunError} from './helpers/write-cloudrun-error';\n\nexport const renderMediaSingleThread = async (\n\tbody: CloudRunPayloadType,\n\tres: ff.Response,\n) => {\n\tif (body.type !== 'media') {\n\t\tthrow new Error('expected type media');\n\t}\n\n\tif (body.clientVersion !== VERSION) {\n\t\tif (!body.clientVersion) {\n\t\t\tthrow new Error(\n\t\t\t\t`Version mismatch: When calling renderMediaOnCloudRun(), you called a service which has the version ${VERSION} but the @remotion/cloudrun package is an older version. Deploy a new service with matchin version and use it to call renderMediaOnCloudRun().`,\n\t\t\t);\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`Version mismatch: When calling renderMediaOnCloudRun(), you called a service, which has the version ${VERSION}, but the @remotion/cloudrun package you used to invoke the function has version ${body.clientVersion}. Deploy a new service and use it to call renderMediaOnCloudrun().`,\n\t\t);\n\t}\n\n\tconst renderId = body.renderIdOverride ?? randomHash({randomInTests: true});\n\n\ttry {\n\t\tconst composition = await getCompositionFromBody(body);\n\n\t\tconst defaultOutName = `out.${RenderInternals.getFileExtensionFromCodec(\n\t\t\tbody.codec,\n\t\t\tbody.audioCodec,\n\t\t)}`;","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/functions/render-media-single-thread.ts#L12-L48","documentation":"Thrown server-side by renderMediaSingleThread() when the incoming request body has no clientVersion at all (body.clientVersion is undefined/null). This means the caller is using a client old enough to not send version metadata, so the deployed service cannot verify compatibility.","triggerScenarios":"A render request reaches the Cloud Run function with body.clientVersion falsy while body.type === 'media' and the service VERSION differs from the missing client version.","commonSituations":"Using a very old @remotion/cloudrun client that predates the clientVersion field, or a third-party tool posting render requests without version metadata.","solutions":["Upgrade @remotion/cloudrun to a version that sends clientVersion.","Redeploy the Cloud Run service to match your client version.","Avoid calling the Cloud Run endpoint with hand-crafted payloads lacking clientVersion."],"exampleFix":"// before: outdated @remotion/cloudrun client\n// after: upgrade and redeploy\nnpm install @remotion/cloudrun@latest\nnpx remotion cloudrun services deploy --region=us-central1","handlingStrategy":"validation","validationCode":"if (!process.env.REMOTION_CLIENT_VERSION) {\n  throw new Error('@remotion/cloudrun client is too old to send clientVersion; upgrade');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Upgrade @remotion/cloudrun to a version that sends clientVersion.","Redeploy the service to the same version as the client."],"tags":["cloudrun","gcp","version-mismatch","render","compatibility"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}