remotion-dev/remotion · error · Error

You have multiple buckets (${remotionBuckets .map((b) =>

Error message

You have multiple buckets (${remotionBuckets
				.map((b) => b.name)
				.join(', ')}) in your Cloud Storage region (${
			params.region
		}) starting with "${REMOTION_BUCKET_PREFIX}". This is an error, please delete buckets so that you have one maximum.

What it means

Thrown by getOrCreateBucket() when more than one Cloud Storage bucket with the 'remotion-' prefix exists in the target GCP region. Remotion Cloud Run requires exactly one such bucket per region to store renders, serve URLs, and intermediates. Having multiple ambiguous buckets prevents the SDK from deterministically choosing the correct one.

Source

Thrown at packages/cloudrun/src/api/get-or-create-bucket.ts:32

			| 'Used bucket',
	) => void;
};

export type GetOrCreateBucketOutput = {
	bucketName: string;
	alreadyExisted: boolean;
};
/*
 * @description Creates a Cloud Storage bucket for Remotion Cloud Run in your GCP project. If one already exists, it will get returned instead.
 * @see [Documentation](https://remotion.dev/docs/cloudrun/getorcreatebucket)
 */
export const getOrCreateBucket = async (
	params: GetOrCreateBucketInput,
): Promise<GetOrCreateBucketOutput> => {
	const {remotionBuckets} = await getRemotionStorageBuckets(params.region);

	if (remotionBuckets.length > 1) {
		throw new Error(
			`You have multiple buckets (${remotionBuckets
				.map((b) => b.name)
				.join(', ')}) in your Cloud Storage region (${
				params.region
			}) starting with "${REMOTION_BUCKET_PREFIX}". This is an error, please delete buckets so that you have one maximum.`,
		);
	}

	if (remotionBuckets.length === 1) {
		params?.updateBucketState?.('Used bucket');
		return {
			bucketName: remotionBuckets[0].name,
			alreadyExisted: true,
		};
	}

	if (params?.region) {
		params.updateBucketState?.('Creating bucket');

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. List your remotion-* buckets in the region with gsutil or the GCP console and delete all but one.
  2. Delete all remotion-* buckets in the region and let getOrCreateBucket recreate a single canonical one.
  3. Avoid concurrent getOrCreateBucket calls in the same region; serialize deploys per region.

Example fix

// before: two remotion-* buckets exist in us-central1
// after: delete the extras
// gcloud storage rm -r gs://remotion-<id-to-remove>
// then re-run getOrCreateBucket({region: 'us-central1'})
Defensive patterns

Strategy: validation

Validate before calling

import {getRemotionStorageBuckets} from '@remotion/cloudrun';

const {remotionBuckets} = await getRemotionStorageBuckets(region);
if (remotionBuckets.length > 1) {
  console.warn('Multiple remotion buckets found:', remotionBuckets.map(b => b.name));
  // prompt user to delete extras before calling getOrCreateBucket
}

Try / catch

try {
  await getOrCreateBucket({region});
} catch (e) {
  if (e.message.includes('multiple buckets')) {
    // list and surface bucket names for cleanup
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling getOrCreateBucket({region}) (directly or via deploy/render APIs that internally call it) when getRemotionStorageBuckets(region) returns a remotionBuckets array with length > 1.

Common situations: Running getOrCreateBucket multiple times in parallel (race), manually creating remotion-* buckets, or running deploy in a region that already has a leftover bucket from a previous deployment without cleanup.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/86612f4b1188d48f. Report an issue: GitHub.