RocketChat/Rocket.Chat · error · Error

error-mac-limit-reached

error-mac-limit-reached

Error message

error-mac-limit-reached

What it means

Thrown by GET livechat/room/:rid/transcript when the room is open and a transcript was requested, but the visitor's last activity month is not already counted AND the installation has reached its monthlyActiveContacts (MAC) license cap. isWithinMACLimit returns true on Community Edition (no license) and on Enterprise when the visitor's v.activity already includes the current YYYY-MM month; otherwise it checks the license gate. So this fires only on EE at or above the MAC ceiling for a brand-new contact month.

Source

Thrown at apps/meteor/server/api/v1/omnichannel/transcript.ts:49

			POST: isPOSTLivechatTranscriptRequestParams,
		},
	},
	{
		async delete() {
			const { rid } = this.urlParams;
			const room = await LivechatRooms.findOneById<Pick<IOmnichannelRoom, 'open' | 'transcriptRequest' | 'v'>>(rid, {
				projection: { open: 1, transcriptRequest: 1, v: 1 },
			});

			if (!room?.open) {
				throw new Error('error-invalid-room');
			}
			if (!room.transcriptRequest) {
				throw new Error('error-transcript-not-requested');
			}

			if (!(await Omnichannel.isWithinMACLimit(room))) {
				throw new Error('error-mac-limit-reached');
			}

			await LivechatRooms.unsetEmailTranscriptRequestedByRoomId(rid);

			return API.v1.success();
		},
		async post() {
			const { rid } = this.urlParams;
			const { email, subject } = this.bodyParams;

			const user = await Users.findOneById(this.userId, {
				projection: { _id: 1, username: 1, name: 1, utcOffset: 1 },
			});

			if (!user) {
				throw new Error('error-invalid-user');
			}

View on GitHub (pinned to f9d3ec372b)

Solutions

  1. Upgrade or apply an EE license with a higher monthlyActiveContacts allowance.
  2. Wait for the calendar month to roll over (the MAC window is month-based UTC) so the cap resets.
  3. Confirm the visitor's v.activity already contains the current YYYY-MM so the contact is counted as already-known rather than newly added.
  4. Verify the license is valid and active in Administration > License; an invalidated license falls back to CE (no limit), so a persistently firing error suggests a partially-applied license.

Example fix

// before
const room = await LivechatRooms.findOneById(rid, { projection: { open: 1, transcriptRequest: 1, v: 1 } });
if (!(await Omnichannel.isWithinMACLimit(room))) { /* hard fail */ }

// after - surface a meaningful message to the operator and short-circuit before the transcript flow
if (!(await Omnichannel.isWithinMACLimit(room))) {
  throw new Meteor.Error('error-mac-limit-reached', 'Monthly Active Contacts limit reached for this license tier.');
}
Defensive patterns

Strategy: validation

Validate before calling

// Before requesting a transcript, check the MAC posture
const macOk = await fetch('/api/v1/v1/livechat/room/' + rid + '/transcript', { method: 'GET' });
// or proactively confirm license/EE status and visitor.activity month
const activityMonth = room.v?.activity; // expects YYYY-MM substring
const currentMonth = new Date().toISOString().slice(0,7);
if (!activityMonth?.includes(currentMonth)) {
  // contact will be counted as new this month; verify MAC headroom with admin
}

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Calling GET /api/v1/v1/livechat/room/:rid/transcript on an open omnichannel room whose visitor has not yet been active this calendar month, on an EE instance whose monthlyActiveContacts limit is exhausted. The check runs after the open + transcriptRequest guards, so those must already pass.

Common situations: EE trial or starter license hit its monthly contact cap mid-month; license downgraded from a tier with a higher MAC allowance; a burst of new omnichannel visitors in a new month pushed the count over the limit.

Related errors


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