remotion-dev/remotion · error · TypeError
The "offset" property of a <Series.Sequence /> must not be N
Error message
The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}). What it means
The optional `offset` prop of <Series.Sequence> (a gap/overlap in frames between sequences) defaults to 0 via `offsetProp ?? 0`. If explicitly NaN, it throws because NaN propagates through the start-frame arithmetic and would silently corrupt the series layout.
Source
Thrown at packages/core/src/series/index.tsx:125
index,
childrenLength,
}: {
readonly durationInFrames: number;
readonly offset: number | undefined;
readonly index: number;
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;
};View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Omit offset to use the default of 0 rather than passing NaN.
- Sanitize before passing: offset={Number.isFinite(v) ? v : undefined}.
- Fix the upstream calculation so it never yields NaN.
Example fix
// before
<Series.Sequence offset={parseInt(userVal)} />
// after
<Series.Sequence offset={Number.isFinite(parseInt(userVal)) ? parseInt(userVal) : undefined} /> Defensive patterns
Strategy: validation
Validate before calling
const safeOffset = Number.isFinite(rawOffset) ? rawOffset : undefined;
Type guard
const isValidOffset = (v: unknown): v is number => typeof v === 'number' && !Number.isNaN(v);
Prevention
- Omit offset instead of passing NaN.
- Sanitize parsed input with Number.isFinite before assigning.
- Guard arithmetic that may operate on undefined operands.
When it happens
Trigger: offset={NaN}, offset={Number('x')}, offset from parseInt('') , or any calculation producing NaN.
Common situations: Parsing user input with parseInt without validation; conditional returning undefined that gets coerced; math on undefined operands.
Related errors
- The "offset" property of a <Series.Sequence /> must be finit
- Emoji ${emoji} not found. Available emojis: ${emojis.map((e)
- No id for composition passed.
- HtmlInCanvas: `width` and `height` must be numbers. Received
- No "src" prop was passed to <Img>.
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/15eee793104d13b6.
Report an issue: GitHub.