remotion-dev/remotion · error · TypeError

The "from" prop of a sequence must be finite, but got ${from

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.

Source

Thrown at packages/core/src/Sequence.tsx:225

		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 78fe4bb3fd)

Solutions

  1. Pass a finite numeric literal: `from={30}`.
  2. Sanitize computed values: `from={Number.isFinite(value) ? Math.round(value) : 0}`.
  3. Validate upstream inputs to detect NaN/Infinity before passing to <Sequence>.
  4. 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

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


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/136a6647a96240a8. Report an issue: GitHub.