remotion-dev/remotion · error · Error
The 'frame' prop of <Freeze /> must be a finite number, but
Error message
The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}. What it means
Thrown by <Freeze /> when frame is Infinity or -Infinity. Freeze requires a finite, addressable frame; non-finite values are almost always the result of an unchecked division or a clamp that was never applied.
Source
Thrown at packages/core/src/freeze.tsx:47
throw new Error(
`The <Freeze /> component requires a 'frame' prop, but none was passed.`,
);
}
if (typeof frameToFreeze !== 'number') {
throw new Error(
`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`,
);
}
if (Number.isNaN(frameToFreeze)) {
throw new Error(
`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`,
);
}
if (!Number.isFinite(frameToFreeze)) {
throw new Error(
`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`,
);
}
const isActive = useMemo(() => {
if (typeof active === 'boolean') {
return active;
}
if (typeof active === 'function') {
return active(frame);
}
}, [active, frame]);
const timelineContext = useTimelineContext();
const sequenceContext = useContext(SequenceContext);
const relativeFrom = sequenceContext?.relativeFrom ?? 0;View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Clamp the frame to the video's durationInFrames: frame={Math.min(Math.max(raw, 0), durationInFrames - 1)}.
- Guard the denominator in frame arithmetic.
- Validate with Number.isFinite(frame) before rendering <Freeze />.
Example fix
// before
const frame = value / denominator; // Infinity when denominator is 0
<Freeze frame={frame}>{scene}</Freeze>
// after
const frame = Number.isFinite(value / denominator)
? Math.min(Math.max(value / denominator, 0), durationInFrames - 1)
: 0;
<Freeze frame={frame}>{scene}</Freeze> Defensive patterns
Strategy: validation
Validate before calling
const frame = Number.isFinite(rawFrame) ? Math.min(Math.max(rawFrame, 0), durationInFrames - 1) : 0;
return <Freeze frame={frame}>{children}</Freeze>; Type guard
const isFiniteFrame = (v: unknown): v is number => typeof v === 'number' && Number.isFinite(v);
Prevention
- Clamp computed frames to [0, durationInFrames - 1].
- Guard denominators against zero in frame formulas.
- Validate with Number.isFinite before rendering <Freeze />.
When it happens
Trigger: Passing frame={x / 0}, frame={Infinity}, or the unclamped output of a calculation that escapes the finite range.
Common situations: Animations extrapolating beyond an input range without extrapolateLeft/Right='clamp'; formulas dividing by a denominator that can reach zero.
Related errors
- The <Freeze /> component requires a 'frame' prop, but none w
- The 'frame' prop of <Freeze /> must be a number, but is of t
- The 'frame' prop of <Freeze /> must be a real number, but it
- The "trimBefore" prop of <Sequence /> must be greater than o
- The "freeze" prop of <Sequence /> must be a number, but is o
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/d2d93cc3996d1820.
Report an issue: GitHub.