{"record":{"id":"136a6647a96240a8","repo":"remotion-dev/remotion","slug":"the-from-prop-of-a-sequence-must-be-finite-but","errorCode":null,"errorMessage":"The \"from\" prop of a sequence must be finite, but got ${from}.","messagePattern":"The \"from\" prop of a sequence must be finite, but got (.+?)\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/Sequence.tsx","lineNumber":225,"sourceCode":"\t\tthrow new TypeError(\n\t\t\t`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`,\n\t\t);\n\t}\n\n\tif (durationInFrames <= 0) {\n\t\tthrow new TypeError(\n\t\t\t`durationInFrames must be positive, but got ${durationInFrames}`,\n\t\t);\n\t}\n\n\tif (typeof from !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`You passed to the \"from\" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`,\n\t\t);\n\t}\n\n\tif (!Number.isFinite(from)) {\n\t\tthrow new TypeError(\n\t\t\t`The \"from\" prop of a sequence must be finite, but got ${from}.`,\n\t\t);\n\t}\n\n\tif (typeof trimBefore !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`You passed to the \"trimBefore\" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.`,\n\t\t);\n\t}\n\n\tif (trimBefore < 0) {\n\t\tthrow new TypeError(\n\t\t\t`The \"trimBefore\" prop of <Sequence /> must be greater than or equal to 0, but got ${trimBefore}.`,\n\t\t);\n\t}\n\n\tif (Number.isNaN(trimBefore)) {\n\t\tthrow new TypeError(","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/Sequence.tsx#L207-L243","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before\n<Sequence from={props.offset / props.scale /* can be Infinity or NaN */} durationInFrames={30} />\n// after\nconst safeFrom = Number.isFinite(props.offset / props.scale) ? Math.round(props.offset / props.scale) : 0;\n<Sequence from={safeFrom} durationInFrames={30} />","handlingStrategy":"validation","validationCode":"if (typeof from === 'number' && !Number.isFinite(from)) {\n  throw new RangeError(`from must be finite; got ${from}`);\n}","typeGuard":"const isFiniteNumber = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v);","tryCatchPattern":null,"preventionTips":["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."],"tags":["sequence","from","validation","math","infinity","nan"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}