{"record":{"id":"47e79ae7b007a700","repo":"remotion-dev/remotion","slug":"the-name-prop-of-componentname-must-be-a-f","errorCode":null,"errorMessage":"The \"${name}\" prop of ${componentName} must be a finite number, but got ${String(value)}.","messagePattern":"The \"(.+?)\" prop of (.+?) must be a finite number, but got (.+?)\\.","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/sequence-crop.ts","lineNumber":93,"sourceCode":"\t\t\t: undefined);\n\tconst rounded = serializedBorderRadius\n\t\t? ` round ${serializedBorderRadius}`\n\t\t: '';\n\n\treturn `inset(${top * 100}% ${right * 100}% ${bottom * 100}% ${left * 100}%${rounded})`;\n};\n\nexport const validateSequenceCrop = (\n\tcrop: SequenceCropInput,\n\tcomponentName = '<Sequence />',\n): void => {\n\tfor (const [name, value] of Object.entries(crop)) {\n\t\tif (value === undefined) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (typeof value !== 'number' || !Number.isFinite(value)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`The \"${name}\" prop of ${componentName} must be a finite number, but got ${String(value)}.`,\n\t\t\t);\n\t\t}\n\n\t\tif (value < 0 || value > 1) {\n\t\t\tthrow new RangeError(\n\t\t\t\t`The \"${name}\" prop of ${componentName} must be between 0 and 1, but got ${value}.`,\n\t\t\t);\n\t\t}\n\t}\n};\n","sourceCodeStart":75,"sourceCodeEnd":105,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/sequence-crop.ts#L75-L105","documentation":"validateSequenceCrop inspects each property of the crop object (e.g. left/right/top/bottom). Undefined is allowed (skipped via `continue`). Any value that is not a number, or is not finite (NaN/Infinity), throws a TypeError because crop ratios must be numeric fractions of the frame.","triggerScenarios":"crop={{left: \"10%\"}}, crop={{top: NaN}}, crop={{right: Infinity}}, crop={{left: true}}.","commonSituations":"Passing CSS-style percentage strings instead of fractions; arithmetic producing NaN; reading a value from config as a string.","solutions":["Pass numeric fractions in [0,1]: crop={{left: 0.1}}.","Leave unused keys undefined (or omit them) so they are skipped.","Ensure upstream arithmetic does not produce NaN/Infinity."],"exampleFix":"// before\n<Series.Sequence crop={{left: \"10%\"}} />\n// after\n<Series.Sequence crop={{left: 0.1}} />","handlingStrategy":"validation","validationCode":"function cleanCrop(c) {\n  const out = {};\n  for (const [k, v] of Object.entries(c)) {\n    if (v === undefined) continue;\n    if (typeof v !== 'number' || !Number.isFinite(v))\n      throw new TypeError(`${k} must be a finite number`);\n    out[k] = v;\n  }\n  return out;\n}","typeGuard":"const isFiniteNumber = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v);","tryCatchPattern":null,"preventionTips":["Pass crop values as numeric fractions, never strings.","Omit unused crop keys rather than passing null/NaN.","Sanitize config-sourced values before passing to <Sequence>."],"tags":["sequence","crop","validation","props"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}