{"record":{"id":"fdae2a054bc06580","repo":"remotion-dev/remotion","slug":"sequencemanagercontext-not-initialized","errorCode":null,"errorMessage":"SequenceManagerContext not initialized","messagePattern":"SequenceManagerContext not initialized","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/SequenceManager.tsx","lineNumber":38,"sourceCode":"const useIsomorphicLayoutEffect =\n\ttypeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n\nexport type SequenceManagerContext = {\n\tregisterSequence: (seq: TSequence) => void;\n\tupdateSequence: ((seq: TSequence) => void) | null;\n\tunregisterSequence: (id: string) => void;\n\tsequences: TSequence[];\n};\n\nexport type SequenceManagerRef = {\n\tcurrent: TSequence[];\n};\n\nexport type SequenceNodePath = Array<string | number>;\n\nexport const SequenceManager = React.createContext<SequenceManagerContext>({\n\tregisterSequence: () => {\n\t\tthrow new Error('SequenceManagerContext not initialized');\n\t},\n\tupdateSequence: null,\n\tunregisterSequence: () => {\n\t\tthrow new Error('SequenceManagerContext not initialized');\n\t},\n\tsequences: [],\n});\n\nexport const SequenceManagerRefContext =\n\tReact.createContext<SequenceManagerRef>({\n\t\tcurrent: [],\n\t});\n\nexport const SequenceRegistrationContext = React.createContext(false);\n\nexport type VisualModePropStatuses = {\n\tpropStatuses: PropStatuses;\n};","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/core/src/SequenceManager.tsx#L20-L56","documentation":"SequenceManager.registerSequence is the default no-op implementation of the React context created in SequenceManager.tsx. Remotion replaces this default with a real <SequenceManager> provider when a composition renders. If the default registerSequence is ever invoked, it means code called sequence registration outside a provider — the context was never initialized by a manager.","triggerScenarios":"Calling registerSequence() from useSequenceRegistration (or any consumer of SequenceManager) while rendering outside the Remotion composition root, e.g. rendering <Sequence> in a plain React app or test without the SequenceManager provider.","commonSituations":"Using @remotion/core components in a plain React app without the Remotion root; unit-testing Sequence components with a bare render() instead of RemotionRoot/test wrappers; version mismatches where an old core renders inside a newer provider setup.","solutions":["Render the component inside a Remotion composition (wrap with <Composition> / RemotionRoot) so the SequenceManager provider is installed","In tests, use Remotion's test render helpers instead of plain ReactDOM render","Pin all @remotion/* packages to the same version to avoid mismatched context modules","If calling registration APIs directly, provide a SequenceManagerContext.Provider with a real implementation"],"exampleFix":"// before\nrender(<Sequence from={0} durationInFrames={10}><MyComp/></Sequence>);\n// after\nrender(<SequenceManagerProvider><Sequence from={0} durationInFrames={10}><MyComp/></Sequence></SequenceManagerProvider>);","handlingStrategy":"try-catch","validationCode":"// Ensure the component is rendered inside a Remotion composition root\nconst insideRemotion = typeof window !== 'undefined' && !!document.querySelector('[data-remotion-root]');","typeGuard":"const hasSequenceManager = (ctx: unknown): ctx is SequenceManagerContext =>\n  ctx !== null && typeof (ctx as SequenceManagerContext).registerSequence === 'function';","tryCatchPattern":"try {\n  registerSequence(node);\n} catch (e) {\n  if (e instanceof Error && e.message === 'SequenceManagerContext not initialized') {\n    console.warn('Sequence rendered outside Remotion root');\n  } else throw e;\n}","preventionTips":["Always render Sequence components via RemotionRoot/<Composition>","Use Remotion's test helpers, never bare ReactDOM render, for core components","Keep all @remotion/* packages on one version","Do not consume SequenceManager context directly in app code"],"tags":["react","context","remotion-core","sequence"],"backgroundTag":"context-not-initialized","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-02T16:25:19.997Z","contentChangedAt":"2026-09-02T16:25:19.997Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}