{"record":{"id":"e750e238e6ffec0a","repo":"RocketChat/Rocket.Chat","slug":"failed-to-create-group-call","errorCode":null,"errorMessage":"failed-to-create-group-call","messagePattern":"failed-to-create-group-call","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/services/video-conference/service.ts","lineNumber":834,"sourceCode":"\t\tconst callId = await VideoConferenceModel.createGroup({\n\t\t\t...extraData,\n\t\t\trid,\n\t\t\ttitle,\n\t\t\tcreatedBy: {\n\t\t\t\t_id: user._id,\n\t\t\t\tname: user.name as string,\n\t\t\t\tusername: user.username as string,\n\t\t\t},\n\t\t\tproviderName,\n\t\t});\n\n\t\tawait this.runNewVideoConferenceEvent(callId);\n\n\t\tawait this.maybeCreateDiscussion(callId, user);\n\n\t\tconst call = (await this.getUnfiltered(callId)) as IGroupVideoConference | null;\n\t\tif (!call) {\n\t\t\tthrow new Error('failed-to-create-group-call');\n\t\t}\n\n\t\tconst url = await this.generateNewUrl(call);\n\t\tawait VideoConferenceModel.setUrlById(callId, url);\n\n\t\tcall.url = url;\n\n\t\tconst messageId = await this.createMessage(call, useAppUser ? undefined : user);\n\t\tcall.messages.started = messageId;\n\t\tawait VideoConferenceModel.setMessageById(callId, 'started', messageId);\n\n\t\tif (call.ringing) {\n\t\t\tawait this.notifyUsersOfRoom(rid, user._id, 'ring', { callId, rid, uid: call.createdBy._id });\n\t\t}\n\n\t\treturn {\n\t\t\ttype: 'videoconference',\n\t\t\tcallId,","sourceCodeStart":816,"sourceCodeEnd":852,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/e4b8178b205510181a96ceefee043d0abcd13e5a/apps/meteor/server/services/video-conference/service.ts#L816-L852","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Audit installed provider apps' onNewVideoConference handlers for deletion/recreation and fix or disable them","Verify the doc exists in video_conference immediately after createGroup (distinguishes deletion from failed insert)","Route these reads to the primary or add a short re-read to absorb replication lag","Retry the group call start once transient causes clear"],"exampleFix":"// before\nconst call = (await this.getUnfiltered(callId)) as IGroupVideoConference | null;\nif (!call) throw new Error('failed-to-create-group-call');\n\n// after\nconst call = (await this.getUnfiltered(callId)) ?? (await this.retryRead(callId, 2, 100));\nif (!call) throw new Error('failed-to-create-group-call');","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n\tawait videoConfService.startCall(user, room, { targetUserIds });\n} catch (err) {\n\tif (err instanceof Error && err.message === 'failed-to-create-group-call') {\n\t\t// check the video_conference collection and app handlers; offer retry\n\t}\n}","preventionTips":["Review installed apps' video conf event handlers before enabling them workspace-wide","Add a short re-read after create when running against lagging replicas","Retry once on this error - most causes are transient handler races"],"tags":["video-conference","database-consistency","apps-engine","race-condition"],"backgroundTag":"created-record-not-found","analyzedSha":"e4b8178b205510181a96ceefee043d0abcd13e5a","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}