{"record":{"id":"f6b36940dcff00e5","repo":"remotion-dev/remotion","slug":"cannot-call-getinputprops-window-remotion-in","errorCode":null,"errorMessage":"Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.","messagePattern":"Cannot call `getInputProps\\(\\)` - window\\.remotion_inputProps is not set\\. This API is only available if you are in the Studio, or while you are rendering server-side\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/config/input-props.ts","lineNumber":46,"sourceCode":"\t\treturn {} as T;\n\t}\n\n\tif (getRemotionEnvironment().isPlayer) {\n\t\tthrow new Error(\n\t\t\t'You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.',\n\t\t);\n\t}\n\n\tconst override = getInputPropsOverride();\n\tif (override) {\n\t\treturn override as T;\n\t}\n\n\tif (\n\t\ttypeof window === 'undefined' ||\n\t\ttypeof window.remotion_inputProps === 'undefined'\n\t) {\n\t\tthrow new Error(\n\t\t\t'Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.',\n\t\t);\n\t}\n\n\tconst param = window.remotion_inputProps;\n\tif (!param) {\n\t\treturn {} as T;\n\t}\n\n\tconst parsed = deserializeJSONWithSpecialTypes<T>(param);\n\treturn parsed;\n};\n","sourceCodeStart":28,"sourceCodeEnd":59,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/config/input-props.ts#L28-L59","documentation":"After confirming it is not in a Player, getInputProps() reads window.remotion_inputProps, which the Studio and the server-side renderer inject. If that global is absent (meaning the code is running in a plain browser page that is not Studio and not SSR), the function throws because there are no input props to return.","triggerScenarios":"Calling getInputProps() in a standalone web app, a Storybook, a unit test (jsdom), or any browser context that is not the Studio and not invoked by the Remotion server renderer. Also triggered by importing Remotion composition code into a non-Remotion app.","commonSituations":"Running composition code in a test harness; embedding Remotion components in a host app; SSR that does not use Remotion's render machinery.","solutions":["Only call getInputProps() within components loaded by the Studio or the server-side renderer.","In other environments, pass props explicitly or skip the call entirely.","Guard with a check: if (window.remotion_inputProps !== undefined) { ... } before calling, and provide a fallback."],"exampleFix":"// before\nconst props = getInputProps(); // throws in a plain browser\n\n// after\nconst props =\n  typeof window !== 'undefined' &&\n  (window as any).remotion_inputProps !== undefined\n    ? getInputProps()\n    : {defaultProp: true};","handlingStrategy":"validation","validationCode":"const hasInputProps =\n  typeof window !== 'undefined' &&\n  (window as any).remotion_inputProps !== undefined;\nconst props = hasInputProps ? getInputProps() : {};","typeGuard":null,"tryCatchPattern":"try {\n  const props = getInputProps();\n} catch (e) {\n  // not in Studio/SSR; use defaults\n  const props = {};\n}","preventionTips":["Only call getInputProps() in Studio/SSR-hosted components.","Guard with a check on window.remotion_inputProps before calling.","Provide explicit fallback props for non-Remotion hosts."],"tags":["config","props","validation","environment","browser"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}