RocketChat/Rocket.Chat · error · Error

Failed to build App Request external url

Error message

Failed to build App Request external url

What it means

Thrown by AppClientOrchestrator.buildExternalAppRequest when GET /apps/buildExternalAppRequest returns a body without a `url` key. This endpoint builds a URL for an end-user app request (the 'request app' flow). A missing `url` field means the server could not construct the request URL.

Source

Thrown at apps/meteor/client/apps/orchestrator.ts:155

			details: `${details}`,
		});

		if ('url' in result) {
			return result;
		}

		throw new Error('Failed to build external url');
	}

	public async buildExternalAppRequest(appId: string) {
		const result = await sdk.rest.get('/apps/buildExternalAppRequest', {
			appId,
		});

		if ('url' in result) {
			return result;
		}
		throw new Error('Failed to build App Request external url');
	}

	public async buildIncompatibleExternalUrl(appId: string, appVersion: string, action: string): Promise<IAppExternalURL> {
		const result = await sdk.rest.get('/apps/incompatibleModal', {
			appId,
			appVersion,
			action,
		});

		if ('url' in result) {
			return result;
		}

		throw new Error('Failed to build external url');
	}

	public async getCategories(): Promise<Serialized<ICategory[]>> {
		const result = await sdk.rest.get('/apps/categories');

View on GitHub (pinned to f9d3ec372b)

Solutions

  1. Inspect the raw /apps/buildExternalAppRequest response in DevTools.
  2. Confirm the 'App requests' / marketplace feature is enabled in Administration.
  3. Verify the appId is a valid marketplace app.
  4. Ensure the server version supports this route; upgrade if missing.
Defensive patterns

Strategy: try-catch

Type guard

function hasUrlKey(r: unknown): r is { url: string } {
  return typeof r === 'object' && r !== null && 'url' in r;
}

Try / catch

try {
  const { url } = await orchestrator.buildExternalAppRequest(appId);
} catch (e) {
  if ((e as Error).message === 'Failed to build App Request external url') {
    showAppRequestDisabledNotice();
  }
}

Prevention

When it happens

Trigger: Calling buildExternalAppRequest(appId) when the app-request feature is disabled, the appId is invalid, the marketplace registration is missing, or the server returns a non-url envelope with a 200 status.

Common situations: App requests disabled in admin settings; user not permitted to request apps; marketplace not registered; server version without the buildExternalAppRequest route; network layer returning an error JSON body mapped to 200.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12). Data as JSON: /api/errors/92cdcb7561be72e9. Report an issue: GitHub.