{"record":{"id":"7ad128575d881451","repo":"remotion-dev/remotion","slug":"could-not-split-jsx-sequence","errorCode":null,"errorMessage":"Could not split JSX sequence","messagePattern":"Could not split JSX sequence","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/browser-studio/src/browser-studio-operations.ts","lineNumber":1427,"sourceCode":"\t\t\t\tsequenceKeys,\n\t\t\t\tsplitFrame,\n\t\t\t});\n\t\t\tconst nodePathMutation = controller.applyMutation({\n\t\t\t\ttimelineSelection: null,\n\t\t\t\tfileName: absolutePath,\n\t\t\t\tmutate: () => ({\n\t\t\t\t\t...project,\n\t\t\t\t\tfiles: {...project.files, [absolutePath]: result.output},\n\t\t\t\t}),\n\t\t\t\tnodePathMutationFiles: [\n\t\t\t\t\t{\n\t\t\t\t\t\tabsolutePath,\n\t\t\t\t\t\tremappings: result.nodePathRemappings,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t});\n\t\t\tif (nodePathMutation === null) {\n\t\t\t\tthrow new Error('Could not split JSX sequence');\n\t\t\t}\n\n\t\t\treturn {success: true, nodePathMutation};\n\t\t} catch (error) {\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\treason: error instanceof Error ? error.message : String(error),\n\t\t\t\tstack: error instanceof Error && error.stack ? error.stack : '',\n\t\t\t};\n\t\t}\n\t};\n\n\tconst applyCodemod: BrowserStudioOperations['applyCodemod'] = async ({\n\t\tcodemod,\n\t\tdryRun,\n\t\tsymbolicatedStack,\n\t}) => {\n\t\ttry {","sourceCodeStart":1409,"sourceCodeEnd":1445,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/browser-studio/src/browser-studio-operations.ts#L1409-L1445","documentation":"splitJsxSequence commits the split through controller.applyMutation; a null return (the mutation did not change the project, so no node-path mutation was produced) is treated as failure and throws 'Could not split JSX sequence', converted to {success: false, reason} by the catch.","triggerScenarios":"Splitting a Sequence whose nodePath no longer resolves (stale path), or a split request that produces output identical to the input, causing applyMutation to return null.","commonSituations":"Split actions issued from stale editor state after the target Sequence was moved, renamed, or undone; automation replaying node paths against a changed project.","solutions":["Verify the sequence nodePath resolves in the current file before calling splitJsxSequence.","Update stored node paths after mutations by consuming 'sequence-node-paths-remapped' events.","If it reproduces with a valid path and a real split point, capture the file and report it as a bug."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const file = project.files[fileName] ?? '';\nif (!file.includes('<Sequence')) {\n  // target file has no Sequence to split — refresh state before calling splitJsxSequence\n}","typeGuard":null,"tryCatchPattern":"const result = await operations.splitJsxSequence({fileName, nodePath, sequenceKeys, splitFrame});\nif (!result.success && result.reason === 'Could not split JSX sequence') {\n  // nodePath is stale or the split is a no-op: re-resolve the node path and retry once\n}","preventionTips":["Validate the Sequence nodePath against current file contents before splitting.","Update stored paths from 'sequence-node-paths-remapped' after each mutation.","Guard splitFrame to lie strictly inside the sequence duration so the split is a real change."],"tags":["jsx","sequence","codemod","node-path","stale-state"],"backgroundTag":"no-op-mutation-rejected","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}