{"record":{"id":"788d2182bc955e95","repo":"remotion-dev/remotion","slug":"name-must-be-a-number-number-tuple-788d21","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-pixelate/index.ts","lineNumber":104,"sourceCode":"\t] as LinearProgressivePixelateUvCoordinate,\n\tend: [\n\t\t...(params.end ?? DEFAULT_END),\n\t] as LinearProgressivePixelateUvCoordinate,\n\tstartBlockSize: params.startBlockSize ?? DEFAULT_START_BLOCK_SIZE,\n\tendBlockSize: params.endBlockSize ?? DEFAULT_END_BLOCK_SIZE,\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 validateBlockSize = (value: number, name: string): void => {\n\tif (value < 1) {\n\t\tthrow new TypeError(`\"${name}\" must be >= 1`);\n\t}\n};\n\nconst validateParams = (params: LinearProgressivePixelateParams): void => {\n\tassertEffectParamsObject(params, 'Linear progressive pixelate');\n\tassertOptionalUvCoordinate(params.start, 'start');\n\tassertOptionalUvCoordinate(params.end, 'end');\n\tassertOptionalFiniteNumber(params.startBlockSize, 'startBlockSize');\n\tassertOptionalFiniteNumber(params.endBlockSize, 'endBlockSize');\n\tvalidateBlockSize(\n\t\tparams.startBlockSize ?? DEFAULT_START_BLOCK_SIZE,\n\t\t'startBlockSize',","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/linear-progressive-pixelate/index.ts#L86-L122","documentation":"Thrown by assertOptionalUvCoordinate() in the linear-progressive-pixelate effect when `start` or `end` is provided but is not an array of exactly two finite numbers. The field is optional, but once present it must match the [number, number] shape before the progressive-pixelate runtime is invoked.","triggerScenarios":"Calling linearProgressivePixelate({ start: ... }) or linearProgressivePixelate({ end: ... }) with a non-tuple value: a 3-element array, a single number, a string, an `{x,y}` object, or a pair containing NaN/Infinity. Thrown synchronously by validateParams at effect setup.","commonSituations":"Passing objects instead of tuples; deserializing coordinates from JSON where elements are strings; spreading the wrong array; animating with interpolate and returning a malformed value; reusing a 3-vector from another effect.","solutions":["Pass `start` and `end` as explicit 2-number arrays: linearProgressivePixelate({ start: [0, 0.5], end: [1, 0.5] }).","Coerce/validate dynamic values into a [number, number] before passing them in.","Keep values finite — guard against NaN/Infinity from your own math.","Omit the field entirely to accept the defaults ([0,0.5] / [1,0.5]) instead of passing null/empty arrays."],"exampleFix":"// before\nlinearProgressivePixelate({ start: 'left', end: [1, 0.5] });\n// after\nlinearProgressivePixelate({ start: [0, 0.5], end: [1, 0.5] });","handlingStrategy":"type-guard","validationCode":"import type {LinearProgressivePixelateParams} 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]);\nlinearProgressivePixelate({ 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].","Validate dynamic values with isUvTuple before passing them in.","Keep tuple elements finite — guard against NaN/Infinity.","Omit the field rather than passing null/[] to use the 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"}