remotion-dev/remotion · error
shutDownStudio() is not available in read-only Studio
Error message
shutDownStudio() is not available in read-only Studio
What it means
shutDownStudio() refuses to run outside the interactive Remotion Studio. The function first checks getRemotionEnvironment().isStudio and throws this sentinel error when called in a rendered video, the preview server, or other non-Studio runtimes, because there is no Studio process to shut down. Guard the call or only invoke it from Studio-side code.
Source
Thrown at packages/studio/src/api/shut-down-studio.ts:21
* @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
- Check window.remotion_isReadOnlyStudio before calling shutDownStudio() and disable the UI
- Wrap the call in try/catch and inform the user shutdown is unavailable in read-only mode
- Only offer shutdown from a full, locally-running Studio
Example fix
// before
await shutDownStudio();
// after
if (!window.remotion_isReadOnlyStudio) {
await shutDownStudio();
} Defensive patterns
Strategy: type-guard
Validate before calling
const canShutdown = !window.remotion_isReadOnlyStudio;
Type guard
const isWritableStudio = (): boolean => !window.remotion_isReadOnlyStudio;
Try / catch
try {
await shutDownStudio();
} catch (e) {
if ((e as Error).message.includes('read-only')) {
// inform user shutdown is disabled in read-only Studio
} else { throw e; }
} Prevention
- Check window.remotion_isReadOnlyStudio before rendering shutdown UI
- Disable destructive Studio actions in read-only deployments
- Add read-only awareness to Studio plugins/extensions
When it happens
Trigger: Calling shutDownStudio() inside a read-only Studio (window.remotion_isReadOnlyStudio === true), such as a preview link or shared sandbox Studio.
Common situations: Opening a hosted read-only Studio link and invoking shutdown from a custom panel/plugin; running shared Studio extensions that assume a local writable Studio.
Understand the failure class
Background: Permission denied / not authorized / 403 Forbidden: access-control rejections when the caller lacks the required role, grant, or ownership — this error's family across 18 libraries.
Related errors
- installPackages() is not available in Read-Only Studio
- restartStudio() is only available in the Studio
- restartStudio() is not available in read-only Studio
- installPackages() is only available in the Studio
- shutDownStudio() is only available in the Studio
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/de49896b0588ebaa.
Report an issue: GitHub.