remotion-dev/remotion · error
Project changed during Element installation. Please try agai
Error message
Project changed during Element installation. Please try again.
What it means
During a multi-step Element installation, the operations controller holds a reference to the project object it started with. After dependencies are added and before applying node-path mutations, it verifies the project reference is unchanged. If getProject() returns a different object, the project was reloaded/replaced concurrently, and applying the mutation would corrupt state — so the install aborts and asks the user to retry.
Source
Thrown at packages/browser-studio/src/browser-studio-operations.ts:2145
durationInFrames,
from: request.from,
name: request.element.displayName,
position: request.position,
},
});
const projectWithElement = {
...insertion.project,
files: {
...insertion.project.files,
[plan.elementFilePath]: request.element.sourceCode,
},
};
const nextProject = addDependenciesToProject({
dependencies: installedDependencies,
project: projectWithElement,
});
if (getProject() !== project) {
throw new Error(
'Project changed during Element installation. Please try again.',
);
}
const nodePathMutation = controller.applyMutation({
timelineSelection: null,
fileName: insertion.filePath,
mutate: () => nextProject,
nodePathMutationFiles: [
{
absolutePath: insertion.filePath,
remappings: insertion.nodePathRemappings,
},
],
});
if (nodePathMutation === null) {
throw new Error('Could not insert Element');
}View on GitHub (pinned to b2f4e34732)
Solutions
- Retry the Element installation once the project state is stable (as the message says)
- Ensure operations against the same project are serialized/awaited rather than fired concurrently
- Avoid triggering project reloads or navigation while an installation is in flight
- Check for duplicated/overlapping invocations of the install operation in your automation code
Example fix
// before
installElement({...}); // not awaited, second call starts immediately
installElement({...});
// after
await installElement({...});
await installElement({...}); Defensive patterns
Strategy: retry
Try / catch
try {
await installElement({...});
} catch (err) {
if ((err as Error).message.includes('Project changed during Element installation')) {
await new Promise((r) => setTimeout(r, 500));
await installElement({...}); // retry once after state settles
} else throw err;
} Prevention
- Serialize all project-mutating operations (await each before the next)
- Don't navigate or reload the project while an install is running
- Queue concurrent user-triggered installs instead of running them in parallel
When it happens
Trigger: Another operation (or the Studio UI) replacing/reloading the project while an Element installation is in progress; two installs running concurrently against the same project; a hot-reload or external mutation that swaps the project object mid-installation.
Common situations: User triggers a second install or project navigation while the first install's async work is still running; an editor or another automation client mutates the project during the install window.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
Related errors
- Job is not running
- Expected segment
- Expected cluster
- The mediaParserController() was used in multiple parseMedia(
- Invalid JSON (${type}): ${asString}
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/e76af6dba423d910.
Report an issue: GitHub.