remotion-dev/remotion · error · Error
Could not parse service name ${shortServiceName}
Error message
Could not parse service name ${shortServiceName} What it means
Thrown by parseServiceName() when the short service name does not match the expected pattern 'remotion-(.*)-mem([0-9])'. Remotion Cloud Run service names encode the Remotion version and memory tier in this exact format; a mismatch means the service was not created by the Remotion deploy flow.
Source
Thrown at packages/cloudrun/src/api/helpers/parse-service-name.ts:21
import type {GcpRegion} from '../../pricing/gcp-regions';
export const getGcpParent = (region: GcpRegion) => {
const parent = `projects/${getProjectId()}/locations/${region}`;
return parent;
};
export const parseServiceName = (
fullServiceName: string,
region: GcpRegion,
) => {
const parent = getGcpParent(region);
const shortServiceName = fullServiceName.replace(parent + '/services/', '');
const deployedRegion = fullServiceName.split('/')[3] as string;
const matched = shortServiceName.match(/remotion-(.*)-mem([0-9])/);
if (!matched) {
throw new Error(`Could not parse service name ${shortServiceName}`);
}
return {
serviceName: shortServiceName,
remotionVersion: matched[1],
region: deployedRegion as GcpRegion,
consoleUrl: makeConsoleUrl(deployedRegion as GcpRegion, shortServiceName),
};
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Redeploy the service using the Remotion deploy command so it gets the canonical name.
- Verify the service name matches remotion-<version>-mem<n> via gcloud run services list.
- Do not manually rename Remotion-managed Cloud Run services.
Example fix
// before: manually created service 'my-render-svc' // after: deploy through Remotion CLI // npx remotion cloudrun services deploy --memory=2Gi --region=us-central1
Defensive patterns
Strategy: validation
Validate before calling
const REMOTION_SERVICE_RE = /remotion-(.*)-mem([0-9])/;
if (!REMOTION_SERVICE_RE.test(serviceName)) {
throw new Error(`${serviceName} is not a valid Remotion Cloud Run service name`);
} Type guard
const isRemotionServiceName = (name: string): boolean => /remotion-(.*)-mem([0-9])/.test(name);
Prevention
- Always obtain serviceName from a deploy result rather than typing it manually.
- Do not rename Remotion-managed services in the GCP console.
When it happens
Trigger: Calling getServiceInfo against a Cloud Run service whose name does not follow the remotion-<version>-mem<n> convention (e.g., a manually created service or one renamed in the console).
Common situations: Pointing renderMediaOnCloudRun at a custom service, a service deployed by an older/newer Remotion version with a different naming scheme, or a stale cached serviceName.
Related errors
- Service ${serviceName} not found
- You have multiple buckets (${remotionBuckets .map((b) =>
- Bucket creation is required, but no region has been passed.
- Either cloudRunUrl or serviceName must be provided
- Either cloudRunUrl or serviceName must be provided, not both
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/b546ae575d8ca12d.
Report an issue: GitHub.