RocketChat/Rocket.Chat · error · Meteor.Error
Custom_Sound_Error_Name_Already_In_Use
Custom_Sound_Error_Name_Already_In_Use
Error message
The custom sound name is already in use
What it means
Error "The custom sound name is already in use" thrown in RocketChat/Rocket.Chat.
Source
Thrown at apps/meteor/server/lib/media/custom-sounds/lib/insertOrUpdateSound.ts:34
});
}
// allow all characters except colon, whitespace, comma, >, <, &, ", ', /, \, (, )
// more practical than allowing specific sets of characters; also allows foreign languages
const nameValidation = /[\s,:><&"'\/\\\(\)]/;
if (nameValidation.test(soundData.name)) {
throw new Meteor.Error('error-input-is-not-a-valid-field', `${soundData.name} is not a valid name`, {
method: 'insertOrUpdateSound',
input: soundData.name,
field: 'Name',
});
}
const conflictingSound = await CustomSounds.findOneByName(soundData.name, soundData._id, { projection: { _id: 1 } });
if (conflictingSound) {
throw new Meteor.Error('Custom_Sound_Error_Name_Already_In_Use', 'The custom sound name is already in use', {
method: 'insertOrUpdateSound',
});
}
if (!soundData._id) {
return (
await CustomSounds.create({
name: soundData.name,
extension: soundData.extension,
})
).insertedId;
}
if (soundData.newFile) {
await RocketChatFileCustomSoundsInstance.deleteFile(`${soundData._id}.${soundData.previousExtension}`);
}
if (soundData.name !== soundData.previousName || soundData.extension !== soundData.previousExtension) {View on GitHub (pinned to b2c16d5842)
Solutions
- Choose a different sound name; another custom sound already uses this name.
- Delete or rename the existing custom sound with the conflicting name first.
When it happens
Trigger: Thrown at apps/meteor/server/lib/media/custom-sounds/lib/insertOrUpdateSound.ts:34 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/05725946365adca0.
Report an issue: GitHub.