RocketChat/Rocket.Chat · error · Error

Invalid app provided

Error message

Invalid app provided

What it means

Thrown by UiInteractionBridge.notifyUser when the manager cannot find an app matching the supplied appId. The bridge resolves the app primarily as a sanity check before broadcasting the interaction payload over the notify.uiInteraction channel; an unknown id means the app was uninstalled, disabled, or never existed.

Source

Thrown at apps/meteor/app/apps/server/bridges/uiInteraction.ts:19

import type { IAppServerOrchestrator } from '@rocket.chat/apps';
import { UiInteractionBridge as AppsEngineUiInteractionBridge } from '@rocket.chat/apps/dist/server/bridges/UiInteractionBridge';
import type { IUIKitInteraction } from '@rocket.chat/apps-engine/definition/uikit';
import type { IUser } from '@rocket.chat/apps-engine/definition/users';
import { api } from '@rocket.chat/core-services';
import type * as UiKit from '@rocket.chat/ui-kit';

export class UiInteractionBridge extends AppsEngineUiInteractionBridge {
	constructor(private readonly orch: IAppServerOrchestrator) {
		super();
	}

	protected async notifyUser(user: IUser, interaction: IUIKitInteraction, appId: string): Promise<void> {
		this.orch.debugLog(`The App ${appId} is sending an interaction to user.`);

		const app = this.orch.getManager()?.getOneById(appId);

		if (!app) {
			throw new Error('Invalid app provided');
		}

		void api.broadcast('notify.uiInteraction', user.id, interaction as UiKit.ServerInteraction);
	}
}

View on GitHub (pinned to f9d3ec372b)

Solutions

  1. Verify the app is installed and enabled before dispatching interactions.
  2. Re-fetch the live appId from the manager rather than caching it long-term.
  3. Drop interactions for apps that are no longer present instead of propagating the error.
Defensive patterns

Strategy: validation

Validate before calling

const app = Apps.self?.getManager().getOneById(appId);
if (!app) {
  // app gone; do not dispatch interaction
  return;
}

Try / catch

try {
  await uiInteractionBridge.notifyUser(user, interaction, appId);
} catch (err) {
  if (err instanceof Error && err.message === 'Invalid app provided') {
    // drop interaction for uninstalled/disabled app
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: notifyUser is invoked with an appId that is not currently registered in the App manager — e.g. after the app was uninstalled, while it is disabled, or because the id was passed incorrectly.

Common situations: Stale appId captured before an uninstall/reinstall; race during app disable where a queued interaction is dispatched after teardown; typo or wrong id passed by a multi-app orchestrator.

Related errors


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