{"record":{"id":"aca5707ef0657230","repo":"RocketChat/Rocket.Chat","slug":"invalid-app-provided","errorCode":null,"errorMessage":"Invalid app provided","messagePattern":"Invalid app provided","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/app/apps/server/bridges/uiInteraction.ts","lineNumber":19,"sourceCode":"import type { IAppServerOrchestrator } from '@rocket.chat/apps';\nimport { UiInteractionBridge as AppsEngineUiInteractionBridge } from '@rocket.chat/apps/dist/server/bridges/UiInteractionBridge';\nimport type { IUIKitInteraction } from '@rocket.chat/apps-engine/definition/uikit';\nimport type { IUser } from '@rocket.chat/apps-engine/definition/users';\nimport { api } from '@rocket.chat/core-services';\nimport type * as UiKit from '@rocket.chat/ui-kit';\n\nexport class UiInteractionBridge extends AppsEngineUiInteractionBridge {\n\tconstructor(private readonly orch: IAppServerOrchestrator) {\n\t\tsuper();\n\t}\n\n\tprotected async notifyUser(user: IUser, interaction: IUIKitInteraction, appId: string): Promise<void> {\n\t\tthis.orch.debugLog(`The App ${appId} is sending an interaction to user.`);\n\n\t\tconst app = this.orch.getManager()?.getOneById(appId);\n\n\t\tif (!app) {\n\t\t\tthrow new Error('Invalid app provided');\n\t\t}\n\n\t\tvoid api.broadcast('notify.uiInteraction', user.id, interaction as UiKit.ServerInteraction);\n\t}\n}\n","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/app/apps/server/bridges/uiInteraction.ts#L1-L25","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the app is installed and enabled before dispatching interactions.","Re-fetch the live appId from the manager rather than caching it long-term.","Drop interactions for apps that are no longer present instead of propagating the error."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const app = Apps.self?.getManager().getOneById(appId);\nif (!app) {\n  // app gone; do not dispatch interaction\n  return;\n}","typeGuard":null,"tryCatchPattern":"try {\n  await uiInteractionBridge.notifyUser(user, interaction, appId);\n} catch (err) {\n  if (err instanceof Error && err.message === 'Invalid app provided') {\n    // drop interaction for uninstalled/disabled app\n  } else {\n    throw err;\n  }\n}","preventionTips":["Re-fetch the live appId from the manager before dispatching.","Drop interactions whose app is no longer installed or enabled.","Avoid caching appId across uninstall/reinstall boundaries."],"tags":["apps-engine","ui-kit","interaction","app-lifecycle"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}