{"record":{"id":"1ef9e61fff38e543","repo":"RocketChat/Rocket.Chat","slug":"room-with-id-transferdata-room-not-found","errorCode":null,"errorMessage":"Room with id ${transferData.room} not found","messagePattern":"Room with id (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/app/apps/server/bridges/listeners.ts","lineNumber":443,"sourceCode":"\t\t\t\tconst [agentData] = args.payload;\n\t\t\t\treturn this.orch\n\t\t\t\t\t.getManager()\n\t\t\t\t\t.getListenerManager()\n\t\t\t\t\t.executeListener(args.event, {\n\t\t\t\t\t\troom: (await this.orch.getConverters().get('rooms').convertRoom(agentData.room)) as IAppsLivechatRoom,\n\t\t\t\t\t\tagent: this.orch.getConverters().get('users').convertToApp(agentData.user),\n\t\t\t\t\t});\n\n\t\t\tcase AppInterface.IPostLivechatRoomTransferred: {\n\t\t\t\tconst [transferData] = args.payload;\n\t\t\t\tconst converter = transferData.type === LivechatTransferEventType.AGENT ? 'users' : 'departments';\n\n\t\t\t\tconst room = await this.orch.getConverters().get('rooms').convertById(transferData.room);\n\t\t\t\tconst from = await this.orch.getConverters().get(converter).convertById(transferData.from);\n\t\t\t\tconst to = await this.orch.getConverters().get(converter).convertById(transferData.to);\n\n\t\t\t\tif (!room) {\n\t\t\t\t\tthrow new Error(`Room with id ${transferData.room} not found`);\n\t\t\t\t}\n\n\t\t\t\tif (!to) {\n\t\t\t\t\tthrow new Error(`Transfer to entity with id ${transferData.to} not found`);\n\t\t\t\t}\n\n\t\t\t\treturn this.orch\n\t\t\t\t\t.getManager()\n\t\t\t\t\t.getListenerManager()\n\t\t\t\t\t.executeListener(args.event, {\n\t\t\t\t\t\troom,\n\t\t\t\t\t\tfrom: from as NonNullable<typeof from>, // type definition in the apps-engine seems to be incorrect\n\t\t\t\t\t\tto,\n\t\t\t\t\t\ttype: transferData.type,\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tcase AppInterface.IPostLivechatGuestSaved: {","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/app/apps/server/bridges/listeners.ts#L425-L461","documentation":"On the IPostLivechatRoomTransferred event (listeners.ts:434-444), AppListenerBridge resolves the room via `rooms.convertById(transferData.room)` and the from/to entities before dispatching to App listeners. If the room resolves to undefined it throws and the event is not delivered to apps.","triggerScenarios":"transferData.room references a room that was deleted, never existed, or could not be read (e.g. replication lag / DB unavailability) at dispatch time.","commonSituations":"Race between room deletion and the transfer event; data-integrity issue; wrong id in the transfer payload; converter returning undefined due to a partial room document.","solutions":["Verify the room with id transferData.room exists at dispatch time.","Investigate data integrity / replication lag if the failure is intermittent.","Ensure transfer payloads carry the correct, current room id."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await appListenerBridge.handleEvent({ event: AppInterface.IPostLivechatRoomTransferred, payload: [transferData] });\n} catch (e) {\n  if (e instanceof Error && /Room with id .* not found/.test(e.message)) {\n    logger.warn({ msg: 'Transfer event skipped: room missing', roomId: transferData.room });\n    return;\n  }\n  throw e;\n}","preventionTips":["Validate livechat room integrity before emitting transfer events.","Monitor for stale room references in transfer workflows.","Investigate intermittent failures as replication lag or converter gaps."],"tags":["apps-engine","livechat","listeners","data-integrity"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}