remotion-dev/remotion · error
shutDownStudio() is only available in the Studio
Error message
shutDownStudio() is only available in the Studio
What it means
shutDownStudio() is a Studio-only API that asks the Remotion Studio process to shut down. When called outside the Studio (e.g. inside a rendered video, preview in a regular browser tab, or plain web app), the environment check fails and the error is thrown.
Source
Thrown at packages/studio/src/api/shut-down-studio.ts:13
/**
* @description Shuts down the Remotion Studio.
* @see [Documentation](https://www.remotion.dev/docs/studio/shut-down-studio)
*/
import type {ShutdownStudioResponse} from '@remotion/studio-shared';
import {getRemotionEnvironment} from 'remotion';
import {callApi} from '../components/call-api';
import {getBrowserStudioOperations} from '../helpers/browser-studio-operations';
export const shutDownStudio = (): Promise<ShutdownStudioResponse> => {
if (!getRemotionEnvironment().isStudio) {
throw new Error('shutDownStudio() is only available in the Studio');
}
if (getBrowserStudioOperations() !== null) {
throw new Error('shutDownStudio() is not supported in Browser Studio');
}
if (window.remotion_isReadOnlyStudio) {
throw new Error('shutDownStudio() is not available in read-only Studio');
}
return callApi('/api/shutdown-studio', {});
};
View on GitHub (pinned to b2f4e34732)
Solutions
- Only call shutDownStudio() in code that runs inside Remotion Studio
- Guard the call with getRemotionEnvironment().isStudio
- Use window.remotion_isStudio (or equivalent check) before invoking
- Move the call out of shared video code into Studio-only UI modules
Example fix
// before
await shutDownStudio();
// after
import {getRemotionEnvironment} from 'remotion';
if (getRemotionEnvironment().isStudio) {
await shutDownStudio();
} Defensive patterns
Strategy: type-guard
Validate before calling
import {getRemotionEnvironment} from 'remotion';
const canShutdown = getRemotionEnvironment().isStudio; Type guard
const inStudio = (): boolean => getRemotionEnvironment().isStudio;
Try / catch
try {
await shutDownStudio();
} catch (e) {
if ((e as Error).message.includes('only available in the Studio')) {
// ignore: not running in Studio
} else { throw e; }
} Prevention
- Only import shutDownStudio in Studio-only modules
- Guard with getRemotionEnvironment().isStudio before calling
- Don't call Studio APIs from compositions or rendered videos
When it happens
Trigger: Calling shutDownStudio() from a Remotion composition, a render environment, or any non-Studio page where getRemotionEnvironment().isStudio is false.
Common situations: Code shared between compositions and Studio UI; calling it from a Player-embedded app; accidentally importing the API into a normal React app; running a rendered video that includes Studio-only calls.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- shutDownStudio() is not supported in Browser Studio
- restartStudio() is only available in the Studio
- restartStudio() is not supported in Browser Studio
- restartStudio() is not available in read-only Studio
- installPackages() is not available in Read-Only Studio
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/2869d8792b9162ed.
Report an issue: GitHub.