remotion-dev/remotion · error

Asset ${resolvedAssetPath} was not found in public/.

Error message

Asset ${resolvedAssetPath} was not found in public/.

What it means

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.

Source

Thrown at packages/studio/src/components/WebMcp.tsx:182

		readonly asset?: string;
		readonly type: string;
	} | null;
	readonly staticFiles: readonly {readonly name: string}[];
}) => {
	const resolvedAssetPath =
		assetPath === undefined
			? currentContent?.type === 'asset'
				? (currentContent.asset ?? null)
				: null
			: assetPath;
	if (typeof resolvedAssetPath !== 'string' || resolvedAssetPath.length === 0) {
		throw new Error(
			'assetPath must be a non-empty public-folder path, or an asset must be selected in Studio.',
		);
	}

	if (!staticFiles.some((file) => file.name === resolvedAssetPath)) {
		throw new Error(`Asset ${resolvedAssetPath} was not found in public/.`);
	}

	return resolvedAssetPath;
};

export const WebMcp: FC = () => {
	const {addCaptionJob, addVideoMattingJob} = useContext(RenderQueueContext);
	const staticFiles = useStaticFiles();
	const {canSelect, clearSelection, selectedItems, selectItems} =
		useTimelineSelection();
	const {canvasContent, compositions, currentCompositionMetadata, folders} =
		useContext(Internals.CompositionManager);
	const {playbackRate: currentPlaybackRate, setPlaybackRate} =
		Internals.usePlaybackRate();
	const {isPlaying} = Internals.Timeline.useTimelineContext();
	const {mediaVolume, playerMuted} = useContext(Internals.MediaVolumeContext);
	const {setPlayerMuted} = useContext(Internals.SetMediaVolumeContext);
	const {setZoom: setTimelineZoom, zoom: timelineZoomMap} =

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Correct assetPath to an exact public/ file path as listed in Studio's static files.
  2. Add the asset to the public/ folder (or upload it) before referencing it.
  3. Refresh/reopen Studio so staticFiles includes newly added assets.
  4. Check for typos, missing extensions, and correct subfolder prefixes.

Example fix

// before
await tool.execute({assetPath: 'voice.mp3'}); // actually at audio/voice.mp3
// after
await tool.execute({assetPath: 'audio/voice.mp3'});
Defensive patterns

Strategy: validation

Validate before calling

if (!staticFiles.some((f) => f.name === assetPath)) {
  throw new Error(`Asset ${assetPath} is not in public/.`);
}

Try / catch

try {
  await transcribeTool({assetPath});
} catch (e) {
  if (e.message.includes('was not found in public/')) {
    listStaticFilesAndRetry();
  }
}

Prevention

When it happens

Trigger: 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/.

Common situations: Agents hallucinating file names; assets added to public/ after Studio indexed static files (needs refresh); referencing files outside public/; missing folder prefix like 'audio/'.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09). Data as JSON: /api/errors/d588af6ebb68813f. Report an issue: GitHub.