remotion-dev/remotion · error · Error

Cannot call `getInputProps()` - window.remotion_inputProps i

Error message

Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.

What it means

After confirming it is not in a Player, getInputProps() reads window.remotion_inputProps, which the Studio and the server-side renderer inject. If that global is absent (meaning the code is running in a plain browser page that is not Studio and not SSR), the function throws because there are no input props to return.

Source

Thrown at packages/core/src/config/input-props.ts:46

		return {} as T;
	}

	if (getRemotionEnvironment().isPlayer) {
		throw new Error(
			'You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.',
		);
	}

	const override = getInputPropsOverride();
	if (override) {
		return override as T;
	}

	if (
		typeof window === 'undefined' ||
		typeof window.remotion_inputProps === 'undefined'
	) {
		throw new Error(
			'Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.',
		);
	}

	const param = window.remotion_inputProps;
	if (!param) {
		return {} as T;
	}

	const parsed = deserializeJSONWithSpecialTypes<T>(param);
	return parsed;
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Only call getInputProps() within components loaded by the Studio or the server-side renderer.
  2. In other environments, pass props explicitly or skip the call entirely.
  3. Guard with a check: if (window.remotion_inputProps !== undefined) { ... } before calling, and provide a fallback.

Example fix

// before
const props = getInputProps(); // throws in a plain browser

// after
const props =
  typeof window !== 'undefined' &&
  (window as any).remotion_inputProps !== undefined
    ? getInputProps()
    : {defaultProp: true};
Defensive patterns

Strategy: validation

Validate before calling

const hasInputProps =
  typeof window !== 'undefined' &&
  (window as any).remotion_inputProps !== undefined;
const props = hasInputProps ? getInputProps() : {};

Try / catch

try {
  const props = getInputProps();
} catch (e) {
  // not in Studio/SSR; use defaults
  const props = {};
}

Prevention

When it happens

Trigger: Calling getInputProps() in a standalone web app, a Storybook, a unit test (jsdom), or any browser context that is not the Studio and not invoked by the Remotion server renderer. Also triggered by importing Remotion composition code into a non-Remotion app.

Common situations: Running composition code in a test harness; embedding Remotion components in a host app; SSR that does not use Remotion's render machinery.

Related errors


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