RocketChat/Rocket.Chat · critical · Error

restricted-workspace

restricted-workspace

Error message

restricted-workspace

What it means

The enterprise patch airGappedRestrictionsWrapper (apps/meteor/ee/server/patches/airGappedRestrictionsWrapper.ts:7) replaces applyAirGappedRestrictionsValidation so that, when AirGappedRestriction.restricted is true (an air-gapped workspace whose license does not permit offline operation), every wrapped operation throws a plain Error('restricted-workspace') instead of running. Wrapped call sites include the sendMessage/updateMessage Meteor methods and REST endpoints such as chat.sendMessage, chat.updateMessage, chat.postMessage/chat.webhook processing, and rooms.createDiscussion.

Solutions

  1. Restore outbound connectivity to the Rocket.Chat cloud so the license can validate and AirGappedRestriction.restricted clears
  2. Apply a valid enterprise license that includes the air-gapped entitlement (offline licensing)
  3. Inspect AirGappedRestriction state and license status (Administration > License) to confirm the restriction before users hit it
  4. If unintended, check for proxy/firewall changes blocking license validation traffic
Defensive patterns

Strategy: validation

Validate before calling

import { AirGappedRestriction } from '@rocket.chat/license';

if (AirGappedRestriction.restricted) {
	// writes (send/update message, discussions, webhooks) will throw 'restricted-workspace'
	throw new Error('restricted-workspace');
}
await sendMessage(user, message);

Try / catch

try {
	await applyAirGappedRestrictionsValidation(() => executeSendMessage(user, message));
} catch (e) {
	if (e instanceof Error && e.message === 'restricted-workspace') {
		// license/air-gap restriction: surface an admin notice; retrying will not help until the license validates
	}
	throw e;
}

Prevention

When it happens

Trigger: Sending or editing messages, posting via webhook, or creating a discussion while the workspace is air-gapped (no cloud connectivity) and its license state marks it restricted — e.g. the offline license validation/grace period failed or the license lacks the air-gapped entitlement.

Common situations: Fully offline installs whose license cannot be validated because the server has no route to Rocket.Chat cloud; license expired on an air-gapped network; firewall/DNS changes severing license validation after a grace window.

Related errors


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

Appendix: source

Thrown at apps/meteor/ee/server/patches/airGappedRestrictionsWrapper.ts:7

import { AirGappedRestriction } from '@rocket.chat/license';

import { applyAirGappedRestrictionsValidation } from '../../../server/lib/cloud/license/airGappedRestrictionsWrapper';

applyAirGappedRestrictionsValidation.patch(async <T>(_: any, fn: () => Promise<T>): Promise<T> => {
	if (AirGappedRestriction.restricted) {
		throw new Error('restricted-workspace');
	}
	return fn();
});

View on GitHub (pinned to b2c16d5842)