RocketChat/Rocket.Chat · error · Error

apps-engine-not-configured-correctly

Error message

apps-engine-not-configured-correctly

What it means

Thrown by OutboundMessageProviderService.getProviderManager when the Apps Engine is loaded but Apps.self?.getManager()?.getOutboundCommunicationProviderManager() returns null/undefined. This indicates the Apps Engine is up but the outbound communication provider manager is not registered/initialized, i.e. a misconfiguration or an Apps Engine version that lacks the outbound manager. Plain Error, code 'apps-engine-not-configured-correctly'.

Source

Thrown at apps/meteor/ee/server/api/v1/omnichannel/lib/outbound.ts:53

	}

	public getProviderMetadata(providerId: string): Promise<IOutboundProviderMetadata> {
		const provider = this.provider.findOneByProviderId(providerId);
		if (!provider) {
			throw new Error('error-invalid-provider');
		}

		return this.getProviderManager().getProviderMetadata(provider.appId, provider.type);
	}

	private getProviderManager() {
		if (!Apps.self?.isLoaded()) {
			throw new Error('apps-engine-not-loaded');
		}

		const manager = Apps.self?.getManager()?.getOutboundCommunicationProviderManager();
		if (!manager) {
			throw new Error('apps-engine-not-configured-correctly');
		}

		return manager;
	}

	public sendMessage(providerId: string, message: IOutboundMessage) {
		const provider = this.provider.findOneByProviderId(providerId);
		if (!provider) {
			throw new Error('error-invalid-provider');
		}

		return this.getProviderManager().sendOutboundMessage(provider.appId, provider.type, message);
	}
}

export const outboundMessageProvider = new OutboundMessageProviderService();

getOutboundService.patch(() => {

View on GitHub (pinned to f9d3ec372b)

Solutions

  1. Upgrade the Apps Engine to a version that registers the OutboundCommunicationProviderManager.
  2. Confirm the apps-engine migration step for outbound providers is complete.
  3. Restart the server after apps-engine updates so the manager registers cleanly.
  4. Check Apps Engine logs for manager registration errors and resolve them.

Example fix

// before: assume manager exists
svc.getProviderMetadata(id);

// after: probe and report configuration clearly
const manager = Apps.self?.getManager()?.getOutboundCommunicationProviderManager();
if (!manager) {
  throw new ConfigError('Outbound manager unavailable; upgrade/restart the Apps Engine.');
}
svc.getProviderMetadata(id);
Defensive patterns

Strategy: validation

Validate before calling

// Confirm the outbound manager is registered before calling
import { Apps } from '@rocket.chat/apps';
function outboundManagerAvailable(): boolean {
  return !!Apps.self?.isLoaded() && !!Apps.self?.getManager()?.getOutboundCommunicationProviderManager();
}
if (!outboundManagerAvailable()) {
  throw new ConfigError('Outbound manager unavailable; upgrade or restart the Apps Engine.');
}
await svc.getProviderMetadata(providerId);

Type guard

function hasOutboundManager(apps: typeof Apps): boolean {
  return !!apps.self?.getManager()?.getOutboundCommunicationProviderManager();
}

Try / catch

try {
  return await svc.getProviderMetadata(providerId);
} catch (e) {
  if (e.message === 'apps-engine-not-configured-correctly') {
    // surface a config error to ops rather than crashing the flow
    reportAppsEngineMisconfiguration();
    return null;
  }
  throw e;
}

Prevention

When it happens

Trigger: Apps.self.isLoaded() is true, but getOutboundCommunicationProviderManager() returns nothing. Happens with an Apps Engine build that does not include the outbound provider manager, or when the manager failed to register during init.

Common situations: Apps Engine version mismatch (older engine without outbound support); partial apps-engine migration (see docs/apps-engine-migration.md); a custom apps-engine build that omits the outbound module; manager registration race.

Related errors


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