remotion-dev/remotion · error · TypeError
Argument missing for parameter "frame"
Error message
Argument missing for parameter "frame"
What it means
validateFrame throws a TypeError when the `frame` parameter is strictly `undefined`. The function is the central frame validator used across Remotion (rendering, seeking, timeline APIs). Reaching this guard means a caller invoked a frame-based API without passing a frame argument at all.
Source
Thrown at packages/core/src/validate-frame.ts:11
export const validateFrame = ({
allowFloats,
durationInFrames,
frame,
}: {
frame: number;
durationInFrames: number;
allowFloats: boolean;
}) => {
if (typeof frame === 'undefined') {
throw new TypeError(`Argument missing for parameter "frame"`);
}
if (typeof frame !== 'number') {
throw new TypeError(
`Argument passed for "frame" is not a number: ${frame}`,
);
}
if (!Number.isFinite(frame)) {
throw new RangeError(`Frame ${frame} is not finite`);
}
if (frame % 1 !== 0 && !allowFloats) {
throw new RangeError(
`Argument for frame must be an integer, but got ${frame}`,
);
}
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Pass an explicit numeric frame: `seekTo(frame)`.
- Default the variable: `const frame = maybeFrame ?? 0;` before calling.
- Audit the call site named in the stack trace and confirm frame is provided.
- Add a TypeScript check — the param is typed `number`, so this usually means `any`/cast hid the undefined.
Example fix
// before player.seekTo(currentFrame); // currentFrame is undefined // after const currentFrame = player.getCurrentFrame(); player.seekTo(currentFrame);
Defensive patterns
Strategy: validation
Validate before calling
if (typeof frame === 'undefined') {
throw new Error('frame is required');
}
validateFrame({ frame, durationInFrames, allowFloats }); Type guard
const isFrameProvided = (f: unknown): f is number => typeof f !== 'undefined';
Prevention
- Type frame as `number` (not `number | undefined`) at API boundaries.
- Initialize frame variables before use; avoid calling frame-based APIs with optional values.
- Enable strict null checks so undefined frames surface at compile time.
When it happens
Trigger: Calling a Remotion API that internally calls validateFrame without supplying frame (e.g. a seeking/timeline method invoked with no args); destructuring frame from an object where the key is absent; passing frame=undefined explicitly.
Common situations: Programmatic seeks via the Player or timeline where the frame variable was never initialized; refactoring that dropped the frame argument; dynamic call sites that build args from optional data.
Related errors
- Argument passed for "frame" is not a number: ${frame}
- Frame ${frame} is not finite
- Argument for frame must be an integer, but got ${frame}
- Cannot use frame ${frame}: Duration of composition is ${dura
- Cannot use frame ${frame}: Duration of composition is ${dura
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/0f31e32b2d13adaf.
Report an issue: GitHub.