{"record":{"id":"741523ad9a1cfe77","repo":"remotion-dev/remotion","slug":"rows-must-be-1-but-got-json-stringify-r-ro","errorCode":null,"errorMessage":"\"rows\" must be >= 1, but got ${JSON.stringify(r.rows)}","messagePattern":"\"rows\" must be >= 1, but got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/pixel-dissolve.ts","lineNumber":120,"sourceCode":"\tassertOptionalFiniteNumber(params.columns, 'columns');\n\tassertOptionalFiniteNumber(params.rows, 'rows');\n\tassertOptionalFiniteNumber(params.seed, 'seed');\n\tassertOptionalFiniteNumber(params.feather, 'feather');\n\tassertOptionalIntegerNumber(params.columns, 'columns');\n\tassertOptionalIntegerNumber(params.rows, 'rows');\n\n\tconst r = resolve(params);\n\tvalidateUnitInterval(r.progress, 'progress');\n\tvalidateUnitInterval(r.feather, 'feather');\n\n\tif (r.columns < 1) {\n\t\tthrow new TypeError(\n\t\t\t`\"columns\" must be >= 1, but got ${JSON.stringify(r.columns)}`,\n\t\t);\n\t}\n\n\tif (r.rows < 1) {\n\t\tthrow new TypeError(\n\t\t\t`\"rows\" must be >= 1, but got ${JSON.stringify(r.rows)}`,\n\t\t);\n\t}\n};\n\ntype PixelDissolveState = {\n\treadonly gl: WebGL2RenderingContext;\n\treadonly program: WebGLProgram;\n\treadonly vao: WebGLVertexArrayObject;\n\treadonly vbo: WebGLBuffer;\n\treadonly texture: WebGLTexture;\n\treadonly uSource: WebGLUniformLocation | null;\n\treadonly uProgress: WebGLUniformLocation | null;\n\treadonly uColumns: WebGLUniformLocation | null;\n\treadonly uRows: WebGLUniformLocation | null;\n\treadonly uSeed: WebGLUniformLocation | null;\n\treadonly uFeather: WebGLUniformLocation | null;\n};","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/pixel-dissolve.ts#L102-L138","documentation":"pixelDissolve() requires 'rows' to be at least 1 after defaults are applied (default is 10). The check fires after integer/finite validation, throwing a TypeError showing the resolved value when rows < 1, preventing a degenerate grid from reaching the shader.","triggerScenarios":"Calling pixelDissolve({ rows: 0 }) or pixelDissolve({ rows: -2 }), or animating rows to/below zero. Checked on the resolved value in validatePixelDissolveParams.","commonSituations":"Animating rows toward zero to fade the effect out; negative values from misconfigured defaults; rounding that collapses to zero on short segments.","solutions":["Keep rows >= 1 (documented range is 1..400).","Clamp animated values: Math.max(1, Math.round(value)).","Fade the dissolve via the 'progress' prop instead of zeroing rows."],"exampleFix":"// before\npixelDissolve({ rows: animatedRows }) // hits 0\n\n// after\npixelDissolve({ rows: Math.max(1, Math.round(animatedRows)) })","handlingStrategy":"validation","validationCode":"// Keep rows within the documented range.\nconst rows = clamp(Math.round(rawRows), 1, 400);\npixelDissolve({ rows });\n// where clamp(n, lo, hi) = Math.min(hi, Math.max(lo, n))","typeGuard":"const isValidRows = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isInteger(v) && v >= 1;","tryCatchPattern":null,"preventionTips":["Clamp animated rows with Math.max(1, Math.round(value)).","Use the 'progress' prop to fade the dissolve instead of zeroing rows.","Reject zero/negative values from external config at the boundary.","Validate against the schema min (1) and max (400) before rendering."],"tags":["validation","typescript","pixel-dissolve","range","params"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}