RocketChat/Rocket.Chat · error · Error

Room not found

Error message

Room ${roomData._id} not found

What it means

Error "Room ${roomData._id} not found" thrown in RocketChat/Rocket.Chat.

Solutions

  1. Verify the room id in the event payload refers to an existing room that the rooms converter can resolve.
  2. Ensure the room still exists in the database before the livechat listener executes.

Example fix

Fetch the room and guard against null: const room = await Rooms.findOneById(roomData._id); if (!room) { throw new Error(`Room ${roomData._id} not found`); }

When it happens

Trigger: Thrown at apps/meteor/app/apps/server/bridges/listeners.ts:513 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at apps/meteor/app/apps/server/bridges/listeners.ts:513

			}

			case AppInterface.IPostLivechatDepartmentRemoved: {
				const [departmentData] = args.payload;
				const department = await this.orch.getConverters().get('departments').convertDepartment(departmentData);

				if (!department) {
					throw new Error(`Department ${departmentData._id} not found`);
				}

				return this.orch.getManager().getListenerManager().executeListener(args.event, { department });
			}

			default:
				const [roomData] = args.payload;
				const room = await this.orch.getConverters().get('rooms').convertRoom(roomData);

				if (!room) {
					throw new Error(`Room ${roomData._id} not found`);
				}

				if (!isLivechatRoom(room)) {
					throw new Error(`Room ${roomData._id} is not a livechat room`);
				}

				return this.orch.getManager().getListenerManager().executeListener(args.event, room);
		}
	}

	async userEvent(args: HandleUserEvent): Promise<unknown> {
		switch (args.event) {
			case AppInterface.IPostUserLoggedIn:
			case AppInterface.IPostUserLoggedOut: {
				const [loggedInUser] = args.payload;
				const context = this.orch.getConverters().get('users').convertToApp(loggedInUser);
				return this.orch.getManager().getListenerManager().executeListener(args.event, context);
			}

View on GitHub (pinned to b2c16d5842)