remotion-dev/remotion · error · Error

serveURL ERROR. File "${fileName}" not found in bucket "${bu

Error message

serveURL ERROR. File "${fileName}" not found in bucket "${bucketName}". Is your site name correct - "${siteName}"?

What it means

Thrown by validateServeUrl() when the serveUrl points into a Google Cloud Storage bucket (starts with https://storage.googleapis.com) but the referenced file does not exist. The validator splits the URL into bucket / file / siteName segments and calls the Cloud Storage client to check existence; on a miss it reports the parsed bucketName, fileName, and siteName so you can see which segment is wrong.

Source

Thrown at packages/cloudrun/src/shared/validate-serveurl.ts:26

			)}`,
		);
	}

	// if GCP Storage URL, validate that file exists
	if (serveUrl.startsWith('https://storage.googleapis.com')) {
		const cloudStorageClient = getCloudStorageClient();

		const bucketName = serveUrl.split('/')[3];
		const fileName = serveUrl.split('/').slice(4).join('/');
		const siteName = serveUrl.split('/')[5];

		const [exists] = await cloudStorageClient
			.bucket(bucketName)
			.file(fileName)
			.exists();

		if (!exists) {
			throw new Error(
				`serveURL ERROR. File "${fileName}" not found in bucket "${bucketName}". Is your site name correct - "${siteName}"?`,
			);
		}
	}
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Re-deploy the serve bundle to the GCS site and confirm the URL with `gsutil ls`.
  2. Compare the bucket and object path in the error against what `deploySite` / `deployService` reported.
  3. Verify the authenticated credentials have storage.objects.get / list on that bucket.
  4. If the site name is wrong, redeploy with the correct siteName and use the returned URL.

Example fix

// before
renderMediaOnCloudRun({
  serveUrl: 'https://storage.googleapis.com/my-bucket/wrong-site/index.html',
  ...,
});

// after
// redeploy with correct site name, then use the returned URL
const {url} = await deploySite({ ... });
renderMediaOnCloudRun({ serveUrl: url, ... });
Defensive patterns

Strategy: try-catch

Validate before calling

const parsed = new URL(serveUrl);
if (parsed.protocol !== 'https:') throw new Error('serveUrl must be https');
// Optionally pre-check existence with your own GCS client before rendering.

Type guard

const isGcsUrl = (v: unknown): v is string =>
  typeof v === 'string' &&
  v.startsWith('https://storage.googleapis.com/');

Try / catch

try {
  await renderMediaOnCloudRun({ serveUrl, ... });
} catch (err) {
  if (err instanceof Error && /serveURL ERROR\. File .* not found/.test(err.message)) {
    // redeploy the serve bundle, then retry with the new URL
  } else throw err;
}

Prevention

When it happens

Trigger: Passing a GCS serveUrl whose bucket or object path is wrong, the bundle was never deployed, was deployed under a different site name, or the authenticated account lacks permission to list the object (which can also report not-exists).

Common situations: Site name mismatch between deploy and render; the serve bundle was deleted or deployed to a different bucket; a copy/paste error in the URL; GCS permissions making the object invisible to the caller.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/8bf62859db4c3b0c. Report an issue: GitHub.