{"record":{"id":"99a36fa0c974a585","repo":"remotion-dev/remotion","slug":"endpointenvname-entrypointenvname-and-se","errorCode":null,"errorMessage":"${endpointEnvName}, ${entryPointEnvName}, and ${sessionIdEnvName} must be set together","messagePattern":"(.+?), (.+?), and (.+?) must be set together","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bundler/src/react-scan-entry-point.ts","lineNumber":21,"sourceCode":"const sessionIdEnvName = 'REMOTION_REACT_SCAN_SESSION_ID';\n\nexport const getReactScanEntryPoint = (\n\tenvironment: 'development' | 'production',\n) => {\n\tif (environment === 'production') {\n\t\treturn null;\n\t}\n\n\tconst endpoint = process.env[endpointEnvName];\n\tconst entryPoint = process.env[entryPointEnvName];\n\tconst sessionId = process.env[sessionIdEnvName];\n\n\tif (!endpoint && !entryPoint && !sessionId) {\n\t\treturn null;\n\t}\n\n\tif (!endpoint || !entryPoint || !sessionId) {\n\t\tthrow new Error(\n\t\t\t`${endpointEnvName}, ${entryPointEnvName}, and ${sessionIdEnvName} must be set together`,\n\t\t);\n\t}\n\n\treturn entryPoint;\n};\n","sourceCodeStart":3,"sourceCodeEnd":28,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/bundler/src/react-scan-entry-point.ts#L3-L28","documentation":"In development builds, the bundler activates React Scan instrumentation only when REMOTION_REACT_SCAN_ENDPOINT, REMOTION_REACT_SCAN_ENTRY_POINT, and REMOTION_REACT_SCAN_SESSION_ID are all set (all-unset cleanly disables it by returning null; production builds always return null). If some but not all three are present, the configuration is inconsistent and getReactScanEntryPoint throws rather than guessing.","triggerScenarios":"Starting a development bundler process where only a subset of the three environment variables is exported - e.g. manually exporting only REMOTION_REACT_SCAN_ENDPOINT, or a stale variable leaking from a previous Studio session while the others were cleared.","commonSituations":"Hand-configuring React Scan and forgetting two of the three variables; a shell profile or .env exporting leftovers; wrapping Studio's bundler launch in custom tooling that forwards only part of the environment.","solutions":["Set all three variables together: REMOTION_REACT_SCAN_ENDPOINT, REMOTION_REACT_SCAN_ENTRY_POINT, REMOTION_REACT_SCAN_SESSION_ID","Unset all three to disable React Scan cleanly","Let Remotion Studio launch the bundler itself so it sets the triple consistently instead of exporting by hand","Check shell profiles and .env files for a stale leftover variable"],"exampleFix":"# before: partial configuration\nexport REMOTION_REACT_SCAN_ENDPOINT=http://localhost:8080\n\n# after: set all three, or none\nexport REMOTION_REACT_SCAN_ENDPOINT=http://localhost:8080\nexport REMOTION_REACT_SCAN_ENTRY_POINT=./react-scan-entry.ts\nexport REMOTION_REACT_SCAN_SESSION_ID=session-1","handlingStrategy":"validation","validationCode":"const names = ['REMOTION_REACT_SCAN_ENDPOINT', 'REMOTION_REACT_SCAN_ENTRY_POINT', 'REMOTION_REACT_SCAN_SESSION_ID'] as const;\nconst values = names.map((n) => process.env[n]);\nif (values.some((v) => v) && !values.every((v) => v)) {\n  throw new Error(`Set all of ${names.join(', ')} together, or none of them`);\n}","typeGuard":"type ReactScanEnv =\n  | {enabled: false}\n  | {enabled: true; endpoint: string; entryPoint: string; sessionId: string};\n\nconst readReactScanEnv = (): ReactScanEnv => {\n  const endpoint = process.env.REMOTION_REACT_SCAN_ENDPOINT;\n  const entryPoint = process.env.REMOTION_REACT_SCAN_ENTRY_POINT;\n  const sessionId = process.env.REMOTION_REACT_SCAN_SESSION_ID;\n  if (!endpoint && !entryPoint && !sessionId) return {enabled: false};\n  if (endpoint && entryPoint && sessionId) return {enabled: true, endpoint, entryPoint, sessionId};\n  throw new Error('REMOTION_REACT_SCAN_* variables must be set together');\n};","tryCatchPattern":null,"preventionTips":["Treat the three REMOTION_REACT_SCAN_* variables as one unit - set all or none","Let Studio spawn the bundler so it injects the triple consistently","Audit shell profiles and .env files for stale react-scan variables before debugging bundler startup"],"tags":["bundler","react-scan","environment-variables","configuration"],"backgroundTag":"missing-env-var","analyzedSha":"10db9de07356446fb0edb3c3ae211369b693d18b","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}