RocketChat/Rocket.Chat · warning · Error

video-conf-data-not-found

Error message

video-conf-data-not-found

What it means

Thrown by runVideoConferenceChangedEvent() when VideoConferenceModel.findOneById(callId) returns null while trying to dispatch the call-changed event to the provider app. The call document no longer exists: it was deleted between the action that triggers the event and this re-read - calls are routinely removed after ending, and app handlers or cleanup jobs can delete them mid-flight.

Source

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

			throw new Error('video-conf-data-not-found');
		}

		if (!videoConfTypes.isCallManagedByApp(call)) {
			return;
		}

		if (!videoConfProviders.isProviderAvailable(call.providerName)) {
			throw new Error('video-conf-provider-unavailable');
		}

		return (await this.getProviderManager()).onNewVideoConference(call.providerName, call);
	}

	private async runVideoConferenceChangedEvent(callId: VideoConference['_id']): Promise<void> {
		const call = await VideoConferenceModel.findOneById(callId);

		if (!call) {
			throw new Error('video-conf-data-not-found');
		}

		if (!videoConfTypes.isCallManagedByApp(call)) {
			return;
		}

		if (!videoConfProviders.isProviderAvailable(call.providerName)) {
			throw new Error('video-conf-provider-unavailable');
		}

		return (await this.getProviderManager()).onVideoConferenceChanged(call.providerName, call);
	}

	private async runOnUserJoinEvent(callId: VideoConference['_id'], user?: IVideoConferenceUser): Promise<void> {
		const call = await VideoConferenceModel.findOneById(callId);

		if (!call) {
			throw new Error('video-conf-data-not-found');

View on GitHub (pinned to e4b8178b20)

Solutions

  1. Treat as a benign race when the call was just ended: verify the call's absence is expected and skip the event
  2. Audit app handlers and cleanup jobs that delete call documents and serialize them with event dispatch
  3. When dispatching events, read the call once and pass the document instead of re-reading by id
  4. Log the callId at the deletion site to identify who removed it

Example fix

// before
const call = await VideoConferenceModel.findOneById(callId);
if (!call) throw new Error('video-conf-data-not-found');

// after
const call = await VideoConferenceModel.findOneById(callId);
if (!call) {
	logger.debug(`call ${callId} vanished before changed event; skipping`);
	return; // call already ended/deleted - event is moot
}
Defensive patterns

Strategy: try-catch

Validate before calling

const call = await VideoConferenceModel.findOneById(callId);
if (!call) {
	// call already ended or deleted - skip dispatching its changed event
	return;
}

Try / catch

try {
	await runVideoConferenceChangedEvent(callId);
} catch (err) {
	if (err instanceof Error && err.message === 'video-conf-data-not-found') return; // benign race
	throw err;
}

Prevention

When it happens

Trigger: Two flows race: one updates or ends the call (triggering the changed event) while another has already deleted the document; app code deletes the call and then a status update fires the changed event; housekeeping pruning of ended calls interleaves with an update.

Common situations: A user ends a call exactly as another participant's action triggers a call-changed callback; provider apps that delete call records; scheduled cleanup jobs racing in-flight events.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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