remotion-dev/remotion · error · Error

{json.error}

Error message

{json.error}

What it means

internalRegisterUsageEvent throws this when the licensing server returns success:false AND res.ok is false. Such errors are not retried (only network/timeout errors are), so this surfaces a definitive server rejection: usually an invalid license key, a request that failed server-side validation, or a usage event the server refused.

Source

Thrown at packages/licensing/src/register-usage-event.ts:122

				}),
				headers: {
					'Content-Type': 'application/json',
				},
				signal: abortController.signal,
			});
			clearTimeout(timeout);

			const json = (await res.json()) as ApiResponse;

			if (json.success) {
				return {
					billable: json.billable,
					classification: json.classification,
				};
			}

			if (!res.ok) {
				throw new Error(json.error);
			}

			throw new Error(
				`Unexpected response from server: ${JSON.stringify(json)}`,
			);
		} catch (err) {
			clearTimeout(timeout);

			const error = err as Error;
			const isTimeout = error.name === 'AbortError';
			const isRetryable = isNetworkError(error) || isTimeout;

			if (!isRetryable) {
				throw err;
			}

			lastError = isTimeout
				? new Error('Request timed out after 10 seconds')

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Inspect json.error for the exact server reason.
  2. Set a valid REMOTION_LICENSE_KEY in the render environment.
  3. If the license is correct, contact Remotion support with the server error text.
  4. Confirm the event payload (host, succeeded, event, isStill, isProduction) matches expected values.

Example fix

// before
// env: REMOTION_LICENSE_KEY=
// after
// env: REMOTION_LICENSE_KEY=<valid key from remotion.pro dashboard>
Defensive patterns

Strategy: try-catch

Validate before calling

const key = process.env.REMOTION_LICENSE_KEY;
if (typeof key !== 'string' || key.length < 10) {
  throw new Error('REMOTION_LICENSE_KEY is missing or invalid before registering usage');
}

Type guard

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

Try / catch

try {
  await internalRegisterUsageEvent({...});
} catch (e) {
  // Server-rejected usage events are non-retriable; log and continue rendering.
  console.warn('Usage event rejected:', (e as Error).message);
}

Prevention

When it happens

Trigger: Calling register-usage-event machinery (cloud-render/web-render tracking) with an invalid or expired license key; sending an event type the server does not accept; account suspended.

Common situations: Running renders with REMOTION_LICENSE_KEY unset/invalid in production; the license key being revoked between deploys; license tier exceeded and the server refusing to record further usage.

Related errors


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