RocketChat/Rocket.Chat · error · Meteor.Error

error-invalid-configuration

error-invalid-configuration

Error message

['Configuration could only be partially verified'].concat(successes).concat(errors).join(', ')

What it means

The federation configuration check produced mixed results: at least one sub-check succeeded and at least one failed (errors.length > 0 with successes present), so the server throws error-invalid-configuration with 'Configuration could only be partially verified' plus every success and failure, and calls markConfigurationInvalid. Each failed sub-check (e.g. 'failed to verify appservice configuration: ...') is appended to the message.

Source

Thrown at apps/meteor/server/meteor-methods/platform/checkFederationConfiguration.ts:66

		}

		const {
			roundTrip: { durationMs: duration },
		} = status.appservice;

		if (status.appservice.ok) {
			successes.push(`appservice configuration looks good, total round trip time to homeserver ${duration}ms`);
		} else {
			errors.push(`failed to verify appservice configuration: ${status.appservice.error}`);
		}

		if (errors.length) {
			void service.markConfigurationInvalid();

			if (successes.length) {
				const message = ['Configuration could only be partially verified'].concat(successes).concat(errors).join(', ');

				throw new Meteor.Error('error-invalid-configuration', message, { method: 'checkFederationConfiguration' });
			}

			throw new Meteor.Error('error-invalid-configuration', ['Invalid configuration'].concat(errors).join(', '), {
				method: 'checkFederationConfiguration',
			});
		}

		void service.markConfigurationValid();

		return {
			message: ['All configuration looks good'].concat(successes).join(', '),
		};
	},
});

View on GitHub (pinned to b2c16d5842)

Solutions

  1. Read the full error message — it enumerates each failed check with its reason; fix the named component first
  2. Verify the Federation/Matrix bridge settings in the admin UI (homeserver URL, appservice id/secret) and network egress from the Rocket.Chat server to the homeserver
  3. Re-run checkFederationConfiguration after each fix; the config is only marked valid when errors is empty
  4. Re-check after any infra change (proxy, DNS, TLS certificates) that touches the bridge path
Defensive patterns

Strategy: try-catch

Type guard

const isInvalidConfig = (e: unknown): e is Meteor.Error =>
  typeof e === 'object' && e !== null && (e as { error?: string }).error === 'error-invalid-configuration';

Try / catch

try {
  const { message } = await Meteor.callAsync('checkFederationConfiguration');
} catch (e) {
  if (isInvalidConfig(e)) {
    renderConfigReport(e.reason); // reason lists each successful and failed sub-check
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: Running checkFederationConfiguration when part of the Matrix/federation bridge works (e.g. the appservice round-trip succeeds) while another component fails — the concatenated message names exactly which parts succeeded and which failed.

Common situations: Partially configured federation bridges: reachable homeserver but wrong appservice registration; firewalls allowing only some endpoints; DNS SRV records half-configured; certificates valid for one component only; configuration drift after infrastructure changes.

Related errors


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