remotion-dev/remotion · error · TypeError
The "freeze" prop of <Sequence /> must be a real number, but
Error message
The "freeze" prop of <Sequence /> must be a real number, but it is NaN.
What it means
Thrown when the freeze prop is the literal NaN. A NaN freeze frame cannot resolve to any frame index, so playback would be undefined behavior; Remotion rejects it.
Source
Thrown at packages/core/src/Sequence.tsx:262
'The "trimBefore" prop of <Sequence /> must be a real number, but it is NaN.',
);
}
if (!Number.isFinite(trimBefore)) {
throw new TypeError(
`The "trimBefore" prop of <Sequence /> must be finite, but it is ${trimBefore}.`,
);
}
if (typeof freeze !== 'undefined' && freeze !== null) {
if (typeof freeze !== 'number') {
throw new TypeError(
`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`,
);
}
if (Number.isNaN(freeze)) {
throw new TypeError(
`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`,
);
}
if (!Number.isFinite(freeze)) {
throw new TypeError(
`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`,
);
}
}
const absoluteFrame = useTimelinePosition();
const videoConfig = useVideoConfig();
const effectiveRelativeFrom = from - trimBefore;
const absoluteFrom =
(parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;
const parentSequenceDuration = parentSequenceView on GitHub (pinned to 78fe4bb3fd)
Solutions
- Guard with Number.isFinite(freeze) before passing.
- Compute freeze only when source data is numeric: const f = Number(raw); freeze={Number.isFinite(f) ? f : undefined}.
- Fix the upstream calculation that produced NaN.
Example fix
// before
<Sequence freeze={parseInt(params.frame, 10)} />
// after
const f = Number(params.frame);
<Sequence freeze={Number.isFinite(f) ? f : undefined} /> Defensive patterns
Strategy: validation
Validate before calling
const freeze = Number.isFinite(rawFreeze) ? rawFreeze : undefined;
Type guard
const isValidFreeze = (v: unknown): v is number => typeof v === 'number' && Number.isFinite(v);
Prevention
- Validate parsed freeze values with Number.isFinite before use.
- Guard parseInt/parseFloat results from NaN.
When it happens
Trigger: freeze = parseInt(undefined), Number(malformedString), or arithmetic that yields NaN.
Common situations: Pulling freeze from a query param or JSON field that is empty or non-numeric; computing freeze as frameA - frameB where frameB is undefined.
Related errors
- The "from" prop of a sequence must be finite, but got ${from
- The "trimBefore" prop of <Sequence /> must be a real number,
- The "freeze" prop of <Sequence /> must be a number, but is o
- The "freeze" prop of <Sequence /> must be finite, but it is
- Argument passed to "${api}" for param "${param}" is ${JSON.s
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/d968fbbb3641cced.
Report an issue: GitHub.