{"record":{"id":"b1a888840c2dc7f9","repo":"remotion-dev/remotion","slug":"could-not-find-source-map-contents-for-compositi","errorCode":null,"errorMessage":"Could not find source map contents for ${compositionFile}","messagePattern":"Could not find source map contents for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/studio/src/helpers/open-in-editor.ts","lineNumber":231,"sourceCode":"\t});\n\tconst existing = componentResolutionCache.get(cacheKey);\n\tif (existing) {\n\t\treturn existing;\n\t}\n\n\tconst promise = (async () => {\n\t\tconst request = {\n\t\t\tcompositionFile,\n\t\t\tcompositionId,\n\t\t};\n\t\tconst browserStudioOperations = getBrowserStudioOperations();\n\t\tconst body = browserStudioOperations\n\t\t\t? await browserStudioOperations.getCompositionComponentInfo(request)\n\t\t\t: typeof window !== 'undefined' && window.remotion_isReadOnlyStudio\n\t\t\t\t? await (async () => {\n\t\t\t\t\t\tconst files = getSourceMapFilesForSource(compositionFile);\n\t\t\t\t\t\tif (files === null) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t`Could not find source map contents for ${compositionFile}`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst {resolveCompositionComponentLocation} =\n\t\t\t\t\t\t\tawait import('@remotion/studio-codemods/resolve-composition-component-location');\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tcanAddSequence: false,\n\t\t\t\t\t\t\tlocation: resolveCompositionComponentLocation({\n\t\t\t\t\t\t\t\tcompositionFile,\n\t\t\t\t\t\t\t\tcompositionId,\n\t\t\t\t\t\t\t\tproject: {files, rootDir: '.'},\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t};\n\t\t\t\t\t})()\n\t\t\t\t: await callApi('/api/composition-component-info', request);\n\n\t\tconst result = {","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/remotion-dev/remotion/blob/a6a7485a9aeb04219510fbe4874f8941486424df/packages/studio/src/helpers/open-in-editor.ts#L213-L249","documentation":"Thrown in Remotion Studio's open-in-editor flow for read-only Studio deployments: when resolving where a composition's component is defined, the Studio looks up source map files registered for the composition's bundle file and throws if none are found. Source maps must be present in the Studio's in-memory file registry for the editor-jump feature to symbolicate stack traces and component locations. Their absence means the bundle was built without sourcemaps or the file registry wasn't populated.","triggerScenarios":"Running a deployed/read-only Studio (window.remotion_isReadOnlyStudio) whose Webpack bundle was compiled without source maps, or where the sourcemap-contents files were stripped/not uploaded; triggering 'open in editor' or component-info resolution for a composition in such a deployment.","commonSituations":"Production Studio builds with devtool disabled or sourcemaps excluded to shrink the bundle; overrides of webpack config that drop sourcemap emission; CDN/hosting setups that don't upload .map files; version mismatches after upgrading Remotion where sourcemap registration changed.","solutions":["Rebuild the Studio bundle with source maps enabled (Remotion's default devtool setting) and deploy the sourcemap contents","Check any custom webpack.override.js for devtool: false or SourceMapDevToolPlugin exclusions and remove them","Ensure the sourcemap files referenced by the bundle are actually served/uploaded with the deployment","Verify the composition entry file is included in the bundle's source map sources array"],"exampleFix":"// before\n// webpack.override.js\nConfig.output.devtool = false;\n\n// after\n// webpack.override.js — keep sourcemaps so Studio can resolve component locations\nConfig.output.devtool = 'source-map';","handlingStrategy":"fallback","validationCode":"// Detect read-only Studio lacking sourcemaps before offering 'open in editor'\nconst hasSourcemaps = typeof window !== 'undefined'\n  ? !!(window as any).remotion_isReadOnlyStudio === false || filesAvailable()\n  : true;\nif (!hasSourcemaps) {\n  disableOpenInEditor();\n}","typeGuard":null,"tryCatchPattern":"try {\n  await loadCompositionComponentInfo(request);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Could not find source map contents')) {\n    // degrade gracefully: hide the editor jump, show file path from bundle instead\n    return fallbackComponentInfo();\n  }\n  throw err;\n}","preventionTips":["Keep source maps enabled in Studio production builds","Don't strip .map files from deployed Studio bundles","Test 'open in editor' after any webpack override changes"],"tags":["sourcemaps","studio","deployment","webpack","open-in-editor"],"backgroundTag":"missing-sourcemaps","analyzedSha":"a6a7485a9aeb04219510fbe4874f8941486424df","analyzedAt":"2026-08-28T15:39:09.316Z","contentChangedAt":"2026-08-28T15:39:09.316Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}