{"record":{"id":"d0790732079c4a6b","repo":"RocketChat/Rocket.Chat","slug":"failed-to-create-new-room","errorCode":null,"errorMessage":"Failed to create new room","messagePattern":"Failed to create new room","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/import/classes/converters/RoomConverter.ts","lineNumber":131,"sourceCode":"\t\t\t\troomInfo = await createDirectMessage(members, startedByUserId, true);\n\t\t\t} else {\n\t\t\t\tif (!roomData.name) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (roomData.t === 'p') {\n\t\t\t\t\tconst user = await Users.findOneById(creatorId);\n\t\t\t\t\tif (!user) {\n\t\t\t\t\t\tthrow new Error('importer-channel-invalid-creator');\n\t\t\t\t\t}\n\t\t\t\t\troomInfo = await createPrivateGroupMethod(user, roomData.name, members, false, {}, {});\n\t\t\t\t} else {\n\t\t\t\t\troomInfo = await createChannelMethod(creatorId, roomData.name, members, false, {}, {});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\troomData._id = roomInfo.rid;\n\t\t} catch (e) {\n\t\t\tthis._logger.warn({ msg: 'Failed to create new room', name: roomData.name, members, err: e });\n\t\t\tthrow e;\n\t\t}\n\n\t\tawait this.updateRoomId(roomData._id as 'string', roomData);\n\t}\n\n\tasync archiveRoomById(rid: string) {\n\t\tconst responses = await Promise.all([Rooms.archiveById(rid), Subscriptions.archiveByRoomId(rid)]);\n\n\t\tif (responses[1]?.modifiedCount) {\n\t\t\tvoid notifyOnSubscriptionChangedByRoomId(rid);\n\t\t}\n\t}\n\n\tasync updateRoomId(_id: string, roomData: IImportChannel): Promise<void> {\n\t\tconst set = {\n\t\t\tts: roomData.ts,\n\t\t\ttopic: roomData.topic,","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/import/classes/converters/RoomConverter.ts#L113-L149","documentation":"During an import, the RoomConverter failed to create a channel/private group via the server's createChannelMethod/createPrivateGroupMethod. It logs the room name, member list and error, then rethrows — this room's import aborts and, because the error propagates, the import step fails rather than skipping. The inner check 'importer-channel-invalid-creator' fires when the mapped creator user no longer exists.","triggerScenarios":"Creator user id missing from Users when creating a private group; room name colliding with an existing channel/group of the same type; name validation failing after conversion of the source name (empty, too long, invalid characters); members list containing users that failed to import.","commonSituations":"Importing into a workspace that already has channels with the same names; users deleted between the prepare and import phases; Slack/Skype names that normalize to invalid Rocket.Chat room names.","solutions":["Read err in the log entry: 'importer-channel-invalid-creator' means remap or re-import the users first","For duplicate names, delete or rename the existing room, or adjust the imported name, then re-run the import step","Fix the offending entries in the source export (name/members) and re-upload","Re-run — rooms already created in earlier progress are skipped"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// pre-flight before the import step creates rooms\nconst creator = await Users.findOneById(creatorId);\nif (!creator) throw new Error(`importer-channel-invalid-creator: ${creatorId}`);\nconst nameConflict = await Rooms.findOneByName(roomData.name);\nif (nameConflict) {\n\troomData.name = `${roomData.name}-imported`; // or skip/report\n}","typeGuard":null,"tryCatchPattern":"try {\n\troomData._id = (await createChannelMethod(creatorId, roomData.name, members, false, {}, {})).rid;\n} catch (e) {\n\tthis._logger.warn({ msg: 'Failed to create new room', name: roomData.name, members, err: e });\n\tthrow e; // abort this room's import — do not continue with an unset _id\n}","preventionTips":["Import users before channels so creators and members resolve","Check the target workspace for name collisions before importing","Sanitize imported room names to valid Rocket.Chat names before the create call"],"tags":["import","channels","rooms","importer","migration"],"backgroundTag":"room-creation-failed","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}