{"record":{"id":"d968fbbb3641cced","repo":"remotion-dev/remotion","slug":"the-freeze-prop-of-sequence-must-be-a-real-n","errorCode":null,"errorMessage":"The \"freeze\" prop of <Sequence /> must be a real number, but it is NaN.","messagePattern":"The \"freeze\" prop of <Sequence /> must be a real number, but it is NaN\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/Sequence.tsx","lineNumber":262,"sourceCode":"\t\t\t'The \"trimBefore\" prop of <Sequence /> must be a real number, but it is NaN.',\n\t\t);\n\t}\n\n\tif (!Number.isFinite(trimBefore)) {\n\t\tthrow new TypeError(\n\t\t\t`The \"trimBefore\" prop of <Sequence /> must be finite, but it is ${trimBefore}.`,\n\t\t);\n\t}\n\n\tif (typeof freeze !== 'undefined' && freeze !== null) {\n\t\tif (typeof freeze !== 'number') {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"freeze\" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`,\n\t\t\t);\n\t\t}\n\n\t\tif (Number.isNaN(freeze)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"freeze\" prop of <Sequence /> must be a real number, but it is NaN.`,\n\t\t\t);\n\t\t}\n\n\t\tif (!Number.isFinite(freeze)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"freeze\" prop of <Sequence /> must be finite, but it is ${freeze}.`,\n\t\t\t);\n\t\t}\n\t}\n\n\tconst absoluteFrame = useTimelinePosition();\n\tconst videoConfig = useVideoConfig();\n\tconst effectiveRelativeFrom = from - trimBefore;\n\tconst absoluteFrom =\n\t\t(parentSequence?.absoluteFrom ?? 0) + effectiveRelativeFrom;\n\n\tconst parentSequenceDuration = parentSequence","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/Sequence.tsx#L244-L280","documentation":"Thrown when the freeze prop is the literal NaN. A NaN freeze frame cannot resolve to any frame index, so playback would be undefined behavior; Remotion rejects it.","triggerScenarios":"freeze = parseInt(undefined), Number(malformedString), or arithmetic that yields NaN.","commonSituations":"Pulling freeze from a query param or JSON field that is empty or non-numeric; computing freeze as frameA - frameB where frameB is undefined.","solutions":["Guard with Number.isFinite(freeze) before passing.","Compute freeze only when source data is numeric: const f = Number(raw); freeze={Number.isFinite(f) ? f : undefined}.","Fix the upstream calculation that produced NaN."],"exampleFix":"// before\n<Sequence freeze={parseInt(params.frame, 10)} />\n\n// after\nconst f = Number(params.frame);\n<Sequence freeze={Number.isFinite(f) ? f : undefined} />","handlingStrategy":"validation","validationCode":"const freeze = Number.isFinite(rawFreeze) ? rawFreeze : undefined;","typeGuard":"const isValidFreeze = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v);","tryCatchPattern":null,"preventionTips":["Validate parsed freeze values with Number.isFinite before use.","Guard parseInt/parseFloat results from NaN."],"tags":["sequence","freeze","nan","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}