{"record":{"id":"03a88ca004cb4bbd","repo":"remotion-dev/remotion","slug":"name-must-be-greater-than-0-but-got-json-s-03a88c","errorCode":null,"errorMessage":"\"${name}\" must be greater than 0, but got ${JSON.stringify(value)}","messagePattern":"\"(.+?)\" must be greater than 0, but got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/liquid-contours.ts","lineNumber":168,"sourceCode":"\tcachedSecondColorRgba: ParsedColorRgba;\n};\n\nconst resolve = (params: LiquidContoursParams): LiquidContoursResolved => ({\n\tfirstColor: params.firstColor ?? DEFAULT_FIRST_COLOR,\n\tsecondColor: params.secondColor ?? DEFAULT_SECOND_COLOR,\n\tspacing: params.spacing ?? DEFAULT_SPACING,\n\tscale: params.scale ?? DEFAULT_SCALE,\n\tcomplexity: params.complexity ?? DEFAULT_COMPLEXITY,\n\tsmoothness: params.smoothness ?? DEFAULT_SMOOTHNESS,\n\tseed: params.seed ?? DEFAULT_SEED,\n\toffsetX: params.offsetX ?? DEFAULT_OFFSET_X,\n\toffsetY: params.offsetY ?? DEFAULT_OFFSET_Y,\n\tphase: params.phase ?? DEFAULT_PHASE,\n});\n\nconst validatePositive = (value: number, name: string): void => {\n\tif (value <= 0) {\n\t\tthrow new TypeError(\n\t\t\t`\"${name}\" must be greater than 0, but got ${JSON.stringify(value)}`,\n\t\t);\n\t}\n};\n\nconst validateLiquidContoursParams = (params: LiquidContoursParams): void => {\n\tassertEffectParamsObject(params, 'Liquid contours');\n\tassertOptionalColor(params.firstColor, 'firstColor');\n\tassertOptionalColor(params.secondColor, 'secondColor');\n\tassertOptionalFiniteNumber(params.spacing, 'spacing');\n\tassertOptionalFiniteNumber(params.scale, 'scale');\n\tassertOptionalFiniteNumber(params.complexity, 'complexity');\n\tassertOptionalFiniteNumber(params.smoothness, 'smoothness');\n\tassertOptionalFiniteNumber(params.seed, 'seed');\n\tassertOptionalFiniteNumber(params.offsetX, 'offsetX');\n\tassertOptionalFiniteNumber(params.offsetY, 'offsetY');\n\tassertOptionalFiniteNumber(params.phase, 'phase');\n","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/liquid-contours.ts#L150-L186","documentation":"Thrown by the Liquid contours effect's validatePositive helper when a resolved numeric parameter that must be > 0 is <= 0. The shipped validator applies this to spacing and scale (validateLiquidContoursParams calls validatePositive(r.spacing, 'spacing') and validatePositive(r.scale, 'scale')), after defaults (spacing 62, scale 300) are applied.","triggerScenarios":"Calling liquidContours({ spacing: 0 }) or liquidContours({ scale: -50 }) or any non-positive value for either. Other params (complexity, smoothness) are validated by validateUnitInterval instead, so they do not trigger this message.","commonSituations":"Animating spacing or scale down to/below zero; computing these from data that can be zero; confusing spacing (band-pair width) with complexity/smoothness (0..1 unit intervals).","solutions":["Set spacing to a value > 0 (schema min is 2) and scale to a value > 0 (schema min is 20).","Clamp animated values: Math.max(2, spacing) and Math.max(20, scale).","Leave spacing/scale undefined to use the defaults (62 and 300)."],"exampleFix":"// before\nliquidContours({ spacing: animatedSpacing }) // can hit 0\n\n// after\nliquidContours({ spacing: Math.max(2, animatedSpacing) })","handlingStrategy":"validation","validationCode":"const safeSpacing = Math.max(2, Number.isFinite(spacing) ? spacing : 62);\nconst safeScale = Math.max(20, Number.isFinite(scale) ? scale : 300);\nliquidContours({ spacing: safeSpacing, scale: safeScale });","typeGuard":"const isPositive = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isFinite(v) && v > 0;","tryCatchPattern":null,"preventionTips":["Clamp animated spacing (>= 2) and scale (>= 20) before passing them in.","Only spacing and scale use the > 0 rule; complexity/smoothness are 0..1 unit intervals.","Leave spacing/scale undefined to use the safe defaults (62 / 300)."],"tags":["validation","liquid-contours-effect","typescript","params"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}