RocketChat/Rocket.Chat · error · Error

failed-to-create-group-call

Error message

failed-to-create-group-call

What it means

Group-call counterpart of the direct-call failure: VideoConferenceModel.createGroup ran, runNewVideoConferenceEvent and maybeCreateDiscussion completed, but getUnfiltered(callId) returns null for the expected IGroupVideoConference. Because unfiltered reads ignore visibility, the record is genuinely absent - deleted by an app event handler or hook, or not yet visible to the reader after the insert.

Source

Thrown at apps/meteor/server/services/video-conference/service.ts:834

		const callId = await VideoConferenceModel.createGroup({
			...extraData,
			rid,
			title,
			createdBy: {
				_id: user._id,
				name: user.name as string,
				username: user.username as string,
			},
			providerName,
		});

		await this.runNewVideoConferenceEvent(callId);

		await this.maybeCreateDiscussion(callId, user);

		const call = (await this.getUnfiltered(callId)) as IGroupVideoConference | null;
		if (!call) {
			throw new Error('failed-to-create-group-call');
		}

		const url = await this.generateNewUrl(call);
		await VideoConferenceModel.setUrlById(callId, url);

		call.url = url;

		const messageId = await this.createMessage(call, useAppUser ? undefined : user);
		call.messages.started = messageId;
		await VideoConferenceModel.setMessageById(callId, 'started', messageId);

		if (call.ringing) {
			await this.notifyUsersOfRoom(rid, user._id, 'ring', { callId, rid, uid: call.createdBy._id });
		}

		return {
			type: 'videoconference',
			callId,

View on GitHub (pinned to e4b8178b20)

Solutions

  1. Audit installed provider apps' onNewVideoConference handlers for deletion/recreation and fix or disable them
  2. Verify the doc exists in video_conference immediately after createGroup (distinguishes deletion from failed insert)
  3. Route these reads to the primary or add a short re-read to absorb replication lag
  4. Retry the group call start once transient causes clear

Example fix

// before
const call = (await this.getUnfiltered(callId)) as IGroupVideoConference | null;
if (!call) throw new Error('failed-to-create-group-call');

// after
const call = (await this.getUnfiltered(callId)) ?? (await this.retryRead(callId, 2, 100));
if (!call) throw new Error('failed-to-create-group-call');
Defensive patterns

Strategy: try-catch

Try / catch

try {
	await videoConfService.startCall(user, room, { targetUserIds });
} catch (err) {
	if (err instanceof Error && err.message === 'failed-to-create-group-call') {
		// check the video_conference collection and app handlers; offer retry
	}
}

Prevention

When it happens

Trigger: Starting a group call in a channel/team where an app's new-conference handler deletes or rewrites the call document; replica-set read lag right after the insert; a model-level observer removing the doc.

Common situations: Custom or Marketplace conferencing apps with aggressive cleanup handlers; clustered/multi-node dev setups against lagging secondaries; a providerName whose app is present but half-configured so its handler drops the call.

Related errors


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