{"record":{"id":"18ff7c3c7fac3d91","repo":"remotion-dev/remotion","slug":"name-must-be-a-number-number-tuple-18ff7c","errorCode":null,"errorMessage":"\"${name}\" must be a [number, number] tuple","messagePattern":"\"(.+?)\" must be a \\[number, number\\] tuple","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/linear-progressive-blur/index.ts","lineNumber":111,"sourceCode":"\tstart: [\n\t\t...(params.start ?? DEFAULT_START),\n\t] as LinearProgressiveBlurUvCoordinate,\n\tend: [...(params.end ?? DEFAULT_END)] as LinearProgressiveBlurUvCoordinate,\n\tstartBlur: clampBlur(params.startBlur ?? DEFAULT_START_BLUR),\n\tendBlur: clampBlur(params.endBlur ?? DEFAULT_END_BLUR),\n});\n\nconst assertOptionalUvCoordinate = (value: unknown, name: string): void => {\n\tif (value === undefined) {\n\t\treturn;\n\t}\n\n\tif (\n\t\t!Array.isArray(value) ||\n\t\tvalue.length !== 2 ||\n\t\tvalue.some((item) => typeof item !== 'number' || !Number.isFinite(item))\n\t) {\n\t\tthrow new TypeError(`\"${name}\" must be a [number, number] tuple`);\n\t}\n};\n\nconst validateLinearProgressiveBlurParams = (\n\tparams: LinearProgressiveBlurParams,\n): void => {\n\tassertEffectParamsObject(params, 'Linear progressive blur');\n\tassertOptionalUvCoordinate(params.start, 'start');\n\tassertOptionalUvCoordinate(params.end, 'end');\n\tassertOptionalFiniteNumber(params.startBlur, 'startBlur');\n\tassertOptionalFiniteNumber(params.endBlur, 'endBlur');\n};\n\nexport const linearProgressiveBlur = createEffect<\n\tLinearProgressiveBlurParams,\n\tLinearProgressiveBlurState\n>({\n\ttype: 'dev.remotion.effects.linearProgressiveBlur',","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/linear-progressive-blur/index.ts#L93-L129","documentation":"Thrown by assertOptionalUvCoordinate() in the linear-progressive-blur effect when `start` or `end` is provided but is not an array of exactly two finite numbers. The field is optional, but once present the library enforces a strict [number, number] shape before any GPU work.","triggerScenarios":"Calling linearProgressiveBlur({ start: ... }) or linearProgressiveBlur({ end: ... }) with a value that is not a 2-tuple: e.g. a 3-element array, a single number, a string, NaN/Infinity inside the pair, or an object literal. Thrown synchronously by validateLinearProgressiveBlurParams at effect setup.","commonSituations":"Passing `{ x, y }` objects instead of tuples; reading coordinates from JSON/config where they deserialize as non-numbers; accidentally spreading a 3-vector; animating the value via interpolate and returning a non-array; copy-paste from a docs example that used a different shape.","solutions":["Pass `start` and `end` as explicit 2-number arrays: linearProgressiveBlur({ start: [0, 0.5], end: [1, 0.5] }).","If the value comes from dynamic data, coerce and validate it into a [number, number] before passing it in.","Keep values finite — avoid NaN/Infinity from divide-by-zero in your own interpolation.","Leave the field undefined to use the defaults ([0,0.5] / [1,0.5]) rather than passing null/empty arrays."],"exampleFix":"// before\nlinearProgressiveBlur({ start: {x: 0, y: 0.5}, end: [1, 0.5] });\n// after\nlinearProgressiveBlur({ start: [0, 0.5], end: [1, 0.5] });","handlingStrategy":"type-guard","validationCode":"import type {LinearProgressiveBlurParams} from '@remotion/effects';\n\nfunction resolveUvTuple(value: unknown, fallback: readonly [number, number]): readonly [number, number] {\n  if (value === undefined) return fallback;\n  if (!isUvTuple(value)) throw new TypeError(`expected [number, number], got ${JSON.stringify(value)}`);\n  return value;\n}\n\nconst start = resolveUvTuple(rawInput.start, [0, 0.5]);\nconst end = resolveUvTuple(rawInput.end, [1, 0.5]);\nlinearProgressiveBlur({ start, end });","typeGuard":"const isUvTuple = (v: unknown): v is readonly [number, number] =>\n  Array.isArray(v) &&\n  v.length === 2 &&\n  v.every((n) => typeof n === 'number' && Number.isFinite(n));","tryCatchPattern":null,"preventionTips":["Always pass start/end as array literals [x, y], not {x, y} objects.","Validate dynamic data with isUvTuple before feeding it to the effect.","Keep tuple elements finite — guard against NaN/Infinity from your own math.","Omit the field rather than passing null/[] to get the documented defaults."],"tags":["validation","typescript","params","argument","uv-coordinate"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}