remotion-dev/remotion · error · TypeError
The "from" prop of a sequence must be finite, but got
Error message
The "from" prop of a sequence must be finite, but got ${from}. What it means
Thrown by <Sequence> after the `from` type check passes, when from is a number that fails Number.isFinite (Infinity, -Infinity, or NaN). Infinite from values would push the sequence entirely off the timeline and corrupt frame-window math; NaN would silently propagate to every relative frame. The check explicitly rejects these non-finite numerics.
Solutions
- Pass a finite numeric literal: `from={30}`.
- Sanitize computed values: `from={Number.isFinite(value) ? Math.round(value) : 0}`.
- Validate upstream inputs to detect NaN/Infinity before passing to <Sequence>.
- Use a fallback default when the source value is non-finite.
Example fix
// before
<Sequence from={props.offset / props.scale /* can be Infinity or NaN */} durationInFrames={30} />
// after
const safeFrom = Number.isFinite(props.offset / props.scale) ? Math.round(props.offset / props.scale) : 0;
<Sequence from={safeFrom} durationInFrames={30} /> Defensive patterns
Strategy: validation
Validate before calling
if (typeof from === 'number' && !Number.isFinite(from)) {
throw new RangeError(`from must be finite; got ${from}`);
} Type guard
const isFiniteNumber = (v: unknown): v is number => typeof v === 'number' && Number.isFinite(v);
Prevention
- Sanitize computed from values: fall back to 0 when non-finite.
- Detect NaN/Infinity at the data boundary before passing to <Sequence>.
- Avoid divisions that can yield Infinity (divide-by-zero).
- Unit-test edge cases (NaN, Infinity) for from values.
When it happens
Trigger: Passing `from={Infinity}`, `from={NaN}`, or `from={-Infinity}` to <Sequence>; computing from with a division that yields Infinity or NaN (e.g. 1/0, 0/0).
Common situations: Computed from values from a ratio or division; pulling from a parser that returns NaN on bad input; animating from with an expression that can become Infinity.
Related errors
- Argument passed to " " for param " " is (must be finite)
- durationInFrames must be positive, but got
- Frame is not finite
- must contain only finite numbers, but got [ ]
- startFrom prop can not be NaN or Infinity.
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-08-12).
Data as JSON: /api/errors/136a6647a96240a8.
Report an issue: GitHub.
Appendix: source
Thrown at packages/core/src/Sequence.tsx:229
throw new TypeError(
`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`,
);
}
if (durationInFrames <= 0) {
throw new TypeError(
`durationInFrames must be positive, but got ${durationInFrames}`,
);
}
if (typeof from !== 'number') {
throw new TypeError(
`You passed to the "from" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`,
);
}
if (!Number.isFinite(from)) {
throw new TypeError(
`The "from" prop of a sequence must be finite, but got ${from}.`,
);
}
if (typeof trimBefore !== 'number') {
throw new TypeError(
`You passed to the "trimBefore" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.`,
);
}
if (trimBefore < 0) {
throw new TypeError(
`The "trimBefore" prop of <Sequence /> must be greater than or equal to 0, but got ${trimBefore}.`,
);
}
if (Number.isNaN(trimBefore)) {
throw new TypeError(View on GitHub (pinned to b2f4e34732)