remotion-dev/remotion · error · TypeError

Privacy must be either "private" or "public" or "no-acl"

Error message

Privacy must be either "private" or "public" or "no-acl"

What it means

Thrown by validatePrivacy() when privacy is a string but not one of the three allowed values ('public', 'private', 'no-acl'). Ensures the ACL mode applied to GCS output objects is one Remotion knows how to set. The message lists all valid values.

Source

Thrown at packages/cloudrun/src/shared/validate-privacy.ts:9

import type {Privacy} from './constants';

export function validatePrivacy(privacy: unknown): asserts privacy is Privacy {
	if (typeof privacy !== 'string') {
		throw new TypeError('Privacy must be a string');
	}

	if (privacy !== 'private' && privacy !== 'public' && privacy !== 'no-acl') {
		throw new TypeError(
			'Privacy must be either "private" or "public" or "no-acl"',
		);
	}
}

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Use exactly 'public', 'private', or 'no-acl' (lowercase).
  2. Normalize input with .toLowerCase() before passing if you accept user input.
  3. Default to 'public' (the package DEFAULT_OUTPUT_PRIVACY) when in doubt.

Example fix

// before
await renderMediaOnCloudRun({ privacy: 'Public', ... });
// after
await renderMediaOnCloudRun({ privacy: 'public', ... });
Defensive patterns

Strategy: validation

Validate before calling

import { validatePrivacy } from '@remotion/cloudrun/shared';
validatePrivacy(privacy);

Type guard

type Privacy = 'public' | 'private' | 'no-acl';
function isPrivacy(v: unknown): v is Privacy {
  return v === 'public' || v === 'private' || v === 'no-acl';
}

Try / catch

if (!isPrivacy(privacy)) throw new Error('privacy must be public | private | no-acl');

Prevention

When it happens

Trigger: Passing a misspelled or unsupported privacy value such as 'Public', 'PUBLIC', 'protected', 'readonly', or 'authenticated'.

Common situations: Case mismatch ('Public' vs 'public'); migrating from another cloud provider's terminology; typo; using a Lambda-only privacy value not supported on Cloud Run.

Related errors


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