{"record":{"id":"bcf0a5cbac75a979","repo":"remotion-dev/remotion","slug":"you-passed-to-the-trimbefore-prop-of-your-seque","errorCode":null,"errorMessage":"You passed to the \"trimBefore\" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.","messagePattern":"You passed to the \"trimBefore\" prop of your <Sequence> an argument of type (.+?), but it must be a number\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/Sequence.tsx","lineNumber":231,"sourceCode":"\t\tthrow new TypeError(\n\t\t\t`durationInFrames must be positive, but got ${durationInFrames}`,\n\t\t);\n\t}\n\n\tif (typeof from !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`You passed to the \"from\" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`,\n\t\t);\n\t}\n\n\tif (!Number.isFinite(from)) {\n\t\tthrow new TypeError(\n\t\t\t`The \"from\" prop of a sequence must be finite, but got ${from}.`,\n\t\t);\n\t}\n\n\tif (typeof trimBefore !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`You passed to the \"trimBefore\" prop of your <Sequence> an argument of type ${typeof trimBefore}, but it must be a number.`,\n\t\t);\n\t}\n\n\tif (trimBefore < 0) {\n\t\tthrow new TypeError(\n\t\t\t`The \"trimBefore\" prop of <Sequence /> must be greater than or equal to 0, but got ${trimBefore}.`,\n\t\t);\n\t}\n\n\tif (Number.isNaN(trimBefore)) {\n\t\tthrow new TypeError(\n\t\t\t'The \"trimBefore\" prop of <Sequence /> must be a real number, but it is NaN.',\n\t\t);\n\t}\n\n\tif (!Number.isFinite(trimBefore)) {\n\t\tthrow new TypeError(","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/Sequence.tsx#L213-L249","documentation":"Thrown by <Sequence> when its trimBefore prop is not a number. trimBefore offsets the sequence start by trimming leading frames; a non-number breaks the frame arithmetic (effectiveRelativeFrom = from - trimBefore) so Remotion refuses to render.","triggerScenarios":"Passing trimBefore as a string (e.g. from a URL param or form input), undefined, null, an object, or NaN to <Sequence>. Typically trimBefore is forwarded from parsed config or props without coercion.","commonSituations":"Reading trimBefore from query strings, JSON config, or URL params and passing it uncoerced; spreading external props onto <Sequence> whose trimBefore field is optional/omitted.","solutions":["Coerce trimBefore to a number before passing: trimBefore={Number(rawTrimBefore)}.","Default the prop when it may be absent: trimBefore={rawTrimBefore ?? 0}.","Validate at the boundary with a type guard and fall back to 0.","Check that the upstream source (config file, props) actually serializes a number."],"exampleFix":"// before\n<Sequence from={10} trimBefore={params.trimBefore} />\n\n// after\n<Sequence from={10} trimBefore={Number(params.trimBefore) || 0} />","handlingStrategy":"type-guard","validationCode":"const safeTrimBefore = (v: unknown): number =>\n  typeof v === 'number' && Number.isFinite(v) ? v : 0;\n\n<Sequence trimBefore={safeTrimBefore(raw)} />","typeGuard":"const isTrimBefore = (v: unknown): v is number =>\n  typeof v === 'number' && !Number.isNaN(v) && Number.isFinite(v);","tryCatchPattern":null,"preventionTips":["Always coerce numeric props derived from strings with Number().","Validate config schemas at load boundaries before forwarding to components."],"tags":["sequence","props","validation","typescript"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}