remotion-dev/remotion · error · TypeError

The "offset" property of a <Series.Sequence /> must be finit

Error message

The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).

What it means

After the NaN check, Series.Sequence's offset must be finite (`!Number.isFinite(offset)`). Passing Infinity or -Infinity throws because an infinite gap/overlap makes the sequence layout unbounded and unrenderable.

Source

Thrown at packages/core/src/series/index.tsx:131

	readonly childrenLength: number;
}) => {
	const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
	if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
		validateDurationInFrames(durationInFrames, {
			component: `of a <Series.Sequence /> component`,
			allowFloats: true,
		});
	}

	const offset = offsetProp ?? 0;
	if (Number.isNaN(offset)) {
		throw new TypeError(
			`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`,
		);
	}

	if (!Number.isFinite(offset)) {
		throw new TypeError(
			`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`,
		);
	}

	if (offset % 1 !== 0) {
		throw new TypeError(
			`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`,
		);
	}

	return offset;
};

const SeriesInner: FC<SeriesProps> = (props) => {
	const childrenValue = useMemo(() => {
		const flattenedChildren = flattenChildren(props.children);
		const renderChildren = (i: number, startFrame: number): React.ReactNode => {
			if (i === flattenedChildren.length) {

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Pass a finite integer.
  2. Omit offset to fall back to the default 0.
  3. Clamp the value: offset={Math.max(0, Math.min(v, MAX))}.

Example fix

// before
<Series.Sequence offset={Infinity} />
// after
<Series.Sequence offset={undefined} />
Defensive patterns

Strategy: validation

Validate before calling

const safeOffset = Number.isFinite(rawOffset) ? Math.round(rawOffset) : undefined;

Type guard

const isFiniteOffset = (v: unknown): v is number =>
  typeof v === 'number' && Number.isFinite(v);

Prevention

When it happens

Trigger: offset={Infinity}, offset={-Infinity}, offset={1/0}, or default-param logic leaking Infinity.

Common situations: Math errors producing Infinity; dividing by zero in offset computation; sentinel Infinity leaking into props.

Related errors


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