{"record":{"id":"d92b24c17e78f96f","repo":"RocketChat/Rocket.Chat","slug":"apps-engine-not-configured-correctly","errorCode":"apps-engine-not-configured-correctly","errorMessage":"apps-engine-not-configured-correctly","messagePattern":"apps-engine-not-configured-correctly","errorType":"exception","errorClass":"Error","httpStatus":400,"severity":"error","filePath":"apps/meteor/ee/server/api/v1/omnichannel/lib/outbound.ts","lineNumber":53,"sourceCode":"\t}\n\n\tpublic getProviderMetadata(providerId: string): Promise<IOutboundProviderMetadata> {\n\t\tconst provider = this.provider.findOneByProviderId(providerId);\n\t\tif (!provider) {\n\t\t\tthrow new Error('error-invalid-provider');\n\t\t}\n\n\t\treturn this.getProviderManager().getProviderMetadata(provider.appId, provider.type);\n\t}\n\n\tprivate getProviderManager() {\n\t\tif (!Apps.self?.isLoaded()) {\n\t\t\tthrow new Error('apps-engine-not-loaded');\n\t\t}\n\n\t\tconst manager = Apps.self?.getManager()?.getOutboundCommunicationProviderManager();\n\t\tif (!manager) {\n\t\t\tthrow new Error('apps-engine-not-configured-correctly');\n\t\t}\n\n\t\treturn manager;\n\t}\n\n\tpublic sendMessage(providerId: string, message: IOutboundMessage) {\n\t\tconst provider = this.provider.findOneByProviderId(providerId);\n\t\tif (!provider) {\n\t\t\tthrow new Error('error-invalid-provider');\n\t\t}\n\n\t\treturn this.getProviderManager().sendOutboundMessage(provider.appId, provider.type, message);\n\t}\n}\n\nexport const outboundMessageProvider = new OutboundMessageProviderService();\n\ngetOutboundService.patch(() => {","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/ee/server/api/v1/omnichannel/lib/outbound.ts#L35-L71","documentation":"Apps.self is loaded but getManager()?.getOutboundCommunicationProviderManager() returns nothing: the running apps-engine build does not expose the outbound communication manager. Unlike 'apps-engine-not-loaded' this is not transient — retrying will not fix it; the runtime itself lacks the manager.","triggerScenarios":"Version skew between the Rocket.Chat server and its @rocket.chat/apps packages after a partial upgrade; an apps microservice build that does not implement the outbound communication provider manager.","commonSituations":"Upgrade scripts updating the server but not the bundled apps-engine; custom builds; EE outbound features enabled against an older apps runtime.","solutions":["Bring the apps-engine / @rocket.chat/apps packages to the version matching this server release","Restart so the manager registers after the upgrade","Verify which apps runtime actually serves the server (in-process vs apps microservice) and align its version"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import { Apps } from '@rocket.chat/apps';\n\nconst manager = Apps.self?.isLoaded()\n  ? Apps.self?.getManager()?.getOutboundCommunicationProviderManager()\n  : undefined;\nif (!manager) {\n  throw new Error('apps-engine runtime does not expose the outbound manager - version mismatch, upgrade @rocket.chat/apps');\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await outboundMessageProvider.sendMessage(providerId, message);\n} catch (error) {\n  if (error instanceof Error && error.message === 'apps-engine-not-configured-correctly') {\n    // configuration defect, not transient: do NOT retry; surface an ops-facing error\n    throw new ConfigurationError('apps-engine lacks the outbound communication manager; align apps-engine version with the server');\n  }\n  throw error;\n}","preventionTips":["Upgrade the server and its apps-engine packages together as one release unit","Distinguish this from apps-engine-not-loaded: retrying here is pointless","Smoke-test outbound provider endpoints after every upgrade"],"tags":["omnichannel","outbound","apps-engine","version-mismatch"],"backgroundTag":"service-misconfigured","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}