{"record":{"id":"3f86ab6b541d7c72","repo":"remotion-dev/remotion","slug":"effectlabel-effect-requires-a-parameters-object","errorCode":null,"errorMessage":"${effectLabel} effect requires a parameters object, but got ${JSON.stringify(params)}","messagePattern":"(.+?) effect requires a parameters object, but got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/effects/src/validate-effect-param.ts","lineNumber":6,"sourceCode":"export const assertEffectParamsObject = (\n\tparams: unknown,\n\teffectLabel: string,\n): void => {\n\tif (params === null || typeof params !== 'object') {\n\t\tthrow new TypeError(\n\t\t\t`${effectLabel} effect requires a parameters object, but got ${JSON.stringify(params)}`,\n\t\t);\n\t}\n};\n\nexport const assertRequiredFiniteNumber = (\n\tvalue: unknown,\n\tname: string,\n): void => {\n\tif (typeof value !== 'number' || !Number.isFinite(value)) {\n\t\tthrow new TypeError(\n\t\t\t`\"${name}\" must be a finite number, but got ${JSON.stringify(value)}`,\n\t\t);\n\t}\n};\n\nexport const assertRequiredColor = (value: unknown, name: string): void => {\n\tif (typeof value !== 'string' || value.length === 0) {","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/validate-effect-param.ts#L1-L24","documentation":"Thrown by the shared assertEffectParamsObject validator when an effect's params argument is null, undefined, a primitive, or any non-object value. Nearly every @remotion/effects effect calls this as its first validation step, so the effectLabel in the message identifies which effect was misused. The check uses typeof !== 'object' plus an explicit null guard because typeof null === 'object'.","triggerScenarios":"Calling an effect factory with a non-object argument: vibrance(0.5) instead of vibrance({amount: 0.5}), or tvSignalOff(null), or venetianBlinds('vertical'), or passing undefined because the caller forgot the object wrapper entirely.","commonSituations":"Developer assumes the effect takes positional arguments instead of a params object; data flows from an untyped API or JSON parse where the shape is unknown; a refactor changed the effect signature and old call sites were not updated; serialization/deserialization produced null instead of {}.","solutions":["Wrap params in an object: vibrance({amount: 0.5}) not vibrance(0.5)","If params may be undefined from upstream code, default to an empty object: effect(params ?? {})","Check the effect's TypeScript type definition (e.g. VibranceParams) and ensure your call site matches the readonly object shape","Add a runtime guard before calling the effect if consuming untrusted data"],"exampleFix":"// before\nconst e = vibrance(0.5);\n\n// after\nconst e = vibrance({amount: 0.5});","handlingStrategy":"validation","validationCode":"function isValidEffectParams(value: unknown): boolean {\n  return value !== null && typeof value === 'object';\n}\n\n// Before calling the effect:\nif (!isValidEffectParams(params)) {\n  throw new Error(`Expected params object, got ${typeof params}`);\n}\nconst e = vibrance(params as VibranceParams);","typeGuard":"function isEffectParams(value: unknown): value is Record<string, unknown> {\n  return value !== null && typeof value === 'object';\n}","tryCatchPattern":null,"preventionTips":["Always wrap effect params in an object literal: effect({key: value})","Let TypeScript guide you — the effect's param type (e.g. VibranceParams) is an object type, not a primitive","When consuming untrusted data, validate with isEffectParams before passing to the effect","Default to an empty object if params may be absent: effect(params ?? {})"],"tags":["validation","typescript","params","typeerror","shared-helper"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}