{"record":{"id":"0f31e32b2d13adaf","repo":"remotion-dev/remotion","slug":"argument-missing-for-parameter-frame","errorCode":null,"errorMessage":"Argument missing for parameter \"frame\"","messagePattern":"Argument missing for parameter \"frame\"","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/validate-frame.ts","lineNumber":11,"sourceCode":"export const validateFrame = ({\n\tallowFloats,\n\tdurationInFrames,\n\tframe,\n}: {\n\tframe: number;\n\tdurationInFrames: number;\n\tallowFloats: boolean;\n}) => {\n\tif (typeof frame === 'undefined') {\n\t\tthrow new TypeError(`Argument missing for parameter \"frame\"`);\n\t}\n\n\tif (typeof frame !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Argument passed for \"frame\" is not a number: ${frame}`,\n\t\t);\n\t}\n\n\tif (!Number.isFinite(frame)) {\n\t\tthrow new RangeError(`Frame ${frame} is not finite`);\n\t}\n\n\tif (frame % 1 !== 0 && !allowFloats) {\n\t\tthrow new RangeError(\n\t\t\t`Argument for frame must be an integer, but got ${frame}`,\n\t\t);\n\t}\n","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/validate-frame.ts#L1-L29","documentation":"validateFrame throws a TypeError when the `frame` parameter is strictly `undefined`. The function is the central frame validator used across Remotion (rendering, seeking, timeline APIs). Reaching this guard means a caller invoked a frame-based API without passing a frame argument at all.","triggerScenarios":"Calling a Remotion API that internally calls validateFrame without supplying frame (e.g. a seeking/timeline method invoked with no args); destructuring frame from an object where the key is absent; passing frame=undefined explicitly.","commonSituations":"Programmatic seeks via the Player or timeline where the frame variable was never initialized; refactoring that dropped the frame argument; dynamic call sites that build args from optional data.","solutions":["Pass an explicit numeric frame: `seekTo(frame)`.","Default the variable: `const frame = maybeFrame ?? 0;` before calling.","Audit the call site named in the stack trace and confirm frame is provided.","Add a TypeScript check — the param is typed `number`, so this usually means `any`/cast hid the undefined."],"exampleFix":"// before\nplayer.seekTo(currentFrame); // currentFrame is undefined\n\n// after\nconst currentFrame = player.getCurrentFrame();\nplayer.seekTo(currentFrame);","handlingStrategy":"validation","validationCode":"if (typeof frame === 'undefined') {\n  throw new Error('frame is required');\n}\nvalidateFrame({ frame, durationInFrames, allowFloats });","typeGuard":"const isFrameProvided = (f: unknown): f is number => typeof f !== 'undefined';","tryCatchPattern":null,"preventionTips":["Type frame as `number` (not `number | undefined`) at API boundaries.","Initialize frame variables before use; avoid calling frame-based APIs with optional values.","Enable strict null checks so undefined frames surface at compile time."],"tags":["remotion","frame","validation","typeerror"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}