{"record":{"id":"d588af6ebb68813f","repo":"remotion-dev/remotion","slug":"asset-resolvedassetpath-was-not-found-in-public","errorCode":null,"errorMessage":"Asset ${resolvedAssetPath} was not found in public/.","messagePattern":"Asset (.+?) was not found in public/\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":190,"sourceCode":"\t\treadonly asset?: string;\n\t\treadonly type: string;\n\t} | null;\n\treadonly staticFiles: readonly {readonly name: string}[];\n}) => {\n\tconst resolvedAssetPath =\n\t\tassetPath === undefined\n\t\t\t? currentContent?.type === 'asset'\n\t\t\t\t? (currentContent.asset ?? null)\n\t\t\t\t: null\n\t\t\t: assetPath;\n\tif (typeof resolvedAssetPath !== 'string' || resolvedAssetPath.length === 0) {\n\t\tthrow new Error(\n\t\t\t'assetPath must be a non-empty public-folder path, or an asset must be selected in Studio.',\n\t\t);\n\t}\n\n\tif (!staticFiles.some((file) => file.name === resolvedAssetPath)) {\n\t\tthrow new Error(`Asset ${resolvedAssetPath} was not found in public/.`);\n\t}\n\n\treturn resolvedAssetPath;\n};\n\nconst WebMcpSelectionSync: FC<{\n\treadonly currentSelectionRef: MutableRefObject<string | null>;\n\treadonly selectedSequenceRef: MutableRefObject<WebMcpSequence | null>;\n}> = ({currentSelectionRef, selectedSequenceRef}) => {\n\tconst {selectedItems} = useTimelineSelection();\n\tconst {sequences} = useContext(Internals.SequenceManager);\n\tconst {overrideIdToNodePathMappings} = useContext(\n\t\tInternals.OverrideIdsToNodePathsGettersContext,\n\t);\n\tconst selectedItem = selectedItems.length === 1 ? selectedItems[0] : null;\n\tconst track = useMemo(() => {\n\t\tif (selectedItem === null || selectedItem.type === 'guide') {\n\t\t\treturn null;","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/studio/src/components/WebMcp.tsx#L172-L208","documentation":"After resolving the asset path, the tool verifies the path exists among Studio's known static files (public/ folder). If no static file matches the name, it throws so the caller does not reference a nonexistent asset.","triggerScenarios":"Calling the WebMcp asset tool with assetPath that does not match any file name in the Studio static file list — wrong path, typo, missing extension, or file not present in public/.","commonSituations":"Agents hallucinating file names; assets added to public/ after Studio indexed static files (needs refresh); referencing files outside public/; missing folder prefix like 'audio/'.","solutions":["Correct assetPath to an exact public/ file path as listed in Studio's static files.","Add the asset to the public/ folder (or upload it) before referencing it.","Refresh/reopen Studio so staticFiles includes newly added assets.","Check for typos, missing extensions, and correct subfolder prefixes."],"exampleFix":"// before\nawait tool.execute({assetPath: 'voice.mp3'}); // actually at audio/voice.mp3\n// after\nawait tool.execute({assetPath: 'audio/voice.mp3'});","handlingStrategy":"validation","validationCode":"if (!staticFiles.some((f) => f.name === assetPath)) {\n  throw new Error(`Asset ${assetPath} is not in public/.`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await transcribeTool({assetPath});\n} catch (e) {\n  if (e.message.includes('was not found in public/')) {\n    listStaticFilesAndRetry();\n  }\n}","preventionTips":["Copy assets into public/ before referencing them.","List static files first and pick names from that list.","Refresh Studio after adding files so staticFiles is current.","Use exact names including folders and extensions."],"tags":["mcp","file-not-found","studio"],"backgroundTag":"file-not-found","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}