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
- Only call getInputProps() within components loaded by the Studio or the server-side renderer.
- In other environments, pass props explicitly or skip the call entirely.
- 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
- Only call getInputProps() in Studio/SSR-hosted components.
- Guard with a check on window.remotion_inputProps before calling.
- Provide explicit fallback props for non-Remotion hosts.
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
- You cannot call `getInputProps()` from a <Player>. Instead,
- Emoji ${emoji} not found. Available emojis: ${emojis.map((e)
- The public directory was specified as "${p}", which is the r
- setImageSequence accepts a Boolean Value
- outputLocation must be a string but got ${typeof newOutputLo
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/f6b36940dcff00e5.
Report an issue: GitHub.