{"record":{"id":"b3e48915f417f60d","repo":"remotion-dev/remotion","slug":"component-owned-sequence-initialprops-must-not-define-from","errorCode":null,"errorMessage":"component-owned-sequence initialProps must not define from, durationInFrames, or name, and style must be an object when provided","messagePattern":"component-owned-sequence initialProps must not define from, durationInFrames, or name, and style must be an object when provided","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/studio-protocol/src/element-payload.ts","lineNumber":108,"sourceCode":"\t\tthrow new TypeError(\n\t\t\t'installationMode must be \"wrapped\" or \"component-owned-sequence\"',\n\t\t);\n\t}\n\n\tconst initialProps = input.initialProps ?? null;\n\tif (!isElementInitialProps(initialProps)) {\n\t\tthrow new TypeError(\n\t\t\t'initialProps must be null or an object containing JSON-compatible values with valid JSX attribute names',\n\t\t);\n\t}\n\n\tif (\n\t\t!hasValidElementInitialPropsForInstallationMode({\n\t\t\tinitialProps,\n\t\t\tinstallationMode: input.installationMode,\n\t\t})\n\t) {\n\t\tthrow new TypeError(\n\t\t\t'component-owned-sequence initialProps must not define from, durationInFrames, or name, and style must be an object when provided',\n\t\t);\n\t}\n};\n\nexport const createElementPayload = (\n\tinput: CreateElementPayloadInput,\n): StudioElementPayload => {\n\tassertCreateElementPayloadInput(input);\n\tconst constructed = makeDragData({\n\t\ttype: 'element',\n\t\tdependencies: [...input.dependencies],\n\t\tdimensions: input.dimensions,\n\t\tdisplayName: input.displayName,\n\t\tdurationInFrames: input.durationInFrames,\n\t\tinitialProps: input.initialProps ?? null,\n\t\tslug: input.slug,\n\t\tsourceCode: input.sourceCode,","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/studio-protocol/src/element-payload.ts#L90-L126","documentation":"assertCreateElementPayloadInput throws this TypeError when installationMode is 'component-owned-sequence' but the initialProps violate the constraints for that mode: they must not define 'from', 'durationInFrames', or 'name' (the component owns the Sequence timing), and 'style', if present, must be an object. These props are managed by the generated sequence itself, so user-supplied copies would conflict.","triggerScenarios":"Calling createElementPayload with installationMode: 'component-owned-sequence' and initialProps containing from, durationInFrames, or name keys, or a style value that is not a plain object (string, null, array).","commonSituations":"Reusing the same initialProps object across both 'wrapped' and 'component-owned-sequence' payloads, or copying props from an existing Sequence element (which includes from/durationInFrames) into a new component-owned payload.","solutions":["Delete the from, durationInFrames, and name keys from initialProps when using component-owned-sequence","Ensure style, if provided, is a plain object (e.g. {width: 100}) not a string or null","Switch installationMode to 'wrapped' if you need to control from/durationInFrames yourself","Split shared prop objects and strip Sequence-managed keys before payload creation"],"exampleFix":"// before\ncreateElementPayload({..., installationMode: 'component-owned-sequence', initialProps: {from: 30, durationInFrames: 120, name: 'Seq'}});\n// after\ncreateElementPayload({..., installationMode: 'component-owned-sequence', initialProps: {volume: 1}});","handlingStrategy":"validation","validationCode":"const FORBIDDEN = ['from', 'durationInFrames', 'name'];\nif (installationMode === 'component-owned-sequence') {\n  for (const k of FORBIDDEN) delete initialProps?.[k];\n  if (initialProps && 'style' in initialProps &&\n      (typeof initialProps.style !== 'object' || initialProps.style === null || Array.isArray(initialProps.style))) {\n    delete initialProps.style;\n  }\n}","typeGuard":"const isComponentOwnedProps = (p: unknown): p is Record<string, unknown> =>\n  typeof p === 'object' && p !== null &&\n  !(['from','durationInFrames','name'] as const).some((k) => k in p) &&\n  (!('style' in p) || (typeof p.style === 'object' && p.style !== null && !Array.isArray(p.style)));","tryCatchPattern":"try {\n  const payload = createElementPayload(input);\n} catch (e) {\n  if (e instanceof TypeError && e.message.startsWith('component-owned-sequence initialProps must not define')) {\n    const {from, durationInFrames, name, ...rest} = (input.initialProps ?? {}) as Record<string, unknown>;\n    return createElementPayload({...input, initialProps: rest});\n  }\n  throw e;\n}","preventionTips":["Strip Sequence-managed keys (from, durationInFrames, name) before using component-owned-sequence mode","Don't reuse props captured from an existing <Sequence> element","Ensure style is a plain object, never a string or null"],"tags":["validation","props","element-payload"],"backgroundTag":"invalid-argument-value","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}