remotion-dev/remotion · error

No src passed

Error message

No src passed

What it means

Thrown inside the render-path AudioForRendering useEffect when props.src is falsy. During server-side rendering Remotion must register a render asset for each audio tag; a missing src makes registration impossible.

Solutions

  1. Ensure src is a valid string before the composition renders.
  2. Conditionally render <Audio> only when src exists.
  3. If src is imported, confirm the bundler resolves it to a URL.

Example fix

// before
<Audio src={audioSrc} />

// after
{audioSrc ? <Audio src={audioSrc} /> : null}
Defensive patterns

Strategy: type-guard

Validate before calling

if (!props.src || typeof props.src !== 'string') {
  // skip mounting the audio component during render
}

Type guard

const hasRenderAudioSrc = (v: unknown): v is string =>
  typeof v === 'string' && v.length > 0;

Prevention

When it happens

Trigger: Rendering a composition that contains <Audio> with no src, or where src resolves to undefined at render time.

Common situations: Dynamic src that is undefined when rendering (e.g. import not bundled), conditional audio that still mounts during render, prop drilling that lost the value.

Related errors


AI-assisted analysis of remotion-dev/remotion@46a3a6bf13 (2026-09-18). Data as JSON: /api/errors/321a328b8ddb3850. Report an issue: GitHub.

Appendix: source

Thrown at packages/core/src/audio/AudioForRendering.tsx:101

		volume: volumeProp,
		frame: volumePropFrame,
		mediaVolume: 1,
	});
	warnAboutTooHighVolume(volume);
	const audioEnabled = useAudioEnabled();
	const {shouldUseAudio} = useMediaAudioState({
		muted: props.muted ?? false,
		volume,
		audioEnabled,
	});

	useImperativeHandle(ref, () => {
		return audioRef.current as HTMLVideoElement;
	}, []);

	useEffect(() => {
		if (!props.src) {
			throw new Error('No src passed');
		}

		if (!shouldUseAudio) {
			return;
		}

		registerRenderAsset({
			type: 'audio',
			src: getAbsoluteSrc(props.src),
			id,
			frame: absoluteFrame,
			volume,
			mediaFrame: frame,
			playbackRate: props.playbackRate ?? 1,
			toneFrequency: toneFrequency ?? 1,
			audioStartFrame: Math.max(
				0,
				-(sequenceContext?.cumulatedNegativeFrom ?? 0),

View on GitHub (pinned to 46a3a6bf13)