remotion-dev/remotion · error · Error
Could not add sequence keyframe
Error message
Could not add sequence keyframe
What it means
Rejected by addSequenceKeyframe in @remotion/browser-studio when, after commitKeyframeMutations runs, `result.appliedSequenceMutations[0]` is undefined — i.e. the keyframe 'add' mutation for the given fileName/nodePath/schema was never applied to the project. Unlike the codemod operations, this keyframe operation throws instead of returning a result object, so the promise rejects. The usual cause is a node path or schema that does not match any animatable prop in the current file.
Source
Thrown at packages/browser-studio/src/browser-studio-operations.ts:1584
nodePath: request.nodePath,
schema: request.schema,
updates: [
{
key: request.key,
operation: {
type: 'add',
frame: request.frame,
value: JSON.parse(request.value),
},
},
],
},
],
effectMutations: [],
});
const mutation = result.appliedSequenceMutations[0];
if (!mutation) {
throw new Error('Could not add sequence keyframe');
}
return getSequenceKeyframeResponse({mutation, project: result.project});
},
addEffectKeyframe: async (request) => {
const result = await commitKeyframeMutations({
label: `${request.key} effect keyframe`,
sequenceMutations: [],
effectMutations: [
{
fileName: request.fileName,
sequenceNodePath: request.sequenceNodePath,
effectIndex: request.effectIndex,
schema: request.schema,
updates: [
{
key: request.key,
operation: {View on GitHub (pinned to b2f4e34732)
Solutions
- Refresh node path and schema from the current project state and retry
- Confirm the file at fileName still contains the sequence node at nodePath
- Make sure `value` is a JSON string that parses to a value accepted by the schema
- Wrap the call in try/catch and re-sync your editor state when it rejects
Example fix
// before
await operations.keyframes.addSequenceKeyframe({
fileName,
nodePath: staleNodePath,
schema: staleSchema,
key: 'opacity',
frame: 30,
value: JSON.stringify(0.5),
});
// after
try {
await operations.keyframes.addSequenceKeyframe({
fileName,
nodePath: await getCurrentNodePath(), // freshly resolved
schema: await getCurrentSchema(),
key: 'opacity',
frame: 30,
value: JSON.stringify(0.5),
});
} catch (error) {
await resyncEditorState();
} Defensive patterns
Strategy: try-catch
Try / catch
try {
await operations.keyframes.addSequenceKeyframe({fileName, nodePath, schema, key, frame, value});
} catch (error) {
// nodePath/schema no longer match the project
await resyncEditorState();
throw new Error(`Keyframe add failed: ${error instanceof Error ? error.message : String(error)}`);
} Prevention
- Re-resolve nodePath and schema after every applied mutation
- Validate `value` with JSON.parse and against the schema before sending
- Never queue keyframe adds computed from stale renders
When it happens
Trigger: Calling `keyframes.addSequenceKeyframe({fileName, nodePath, schema, key, frame, value})` where nodePath no longer exists in the file (stale after an edit), the schema does not match the prop's current Zod schema, or the target prop is not keyframe-able. `value` must also be valid JSON or JSON.parse throws first.
Common situations: Timeline UI adds a keyframe using node paths from a previous render; the component's props schema changed after a reload; the node was moved/deleted by another edit between selection and keyframe click.
Related errors
- Could not add effect keyframe
- Could not update sequence keyframe settings
- Could not update effect keyframe settings
- Could not reorder sequence
- Could not split video from audio
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-08-22).
Data as JSON: /api/errors/22f4df00f0001bc1.
Report an issue: GitHub.