RocketChat/Rocket.Chat · error · Meteor.Error

error-app-prevented-updating

error-app-prevented-updating

Error message

A Rocket.Chat App prevented the message updating.

What it means

Error "A Rocket.Chat App prevented the message updating." thrown in RocketChat/Rocket.Chat.

Source

Thrown at apps/meteor/server/lib/messages/updateMessage.ts:34

	}: (AtLeast<IMessage, '_id' | 'rid' | 'msg' | 'customFields'> | AtLeast<IMessage, '_id' | 'rid' | 'content'>) & {
		parseUrls?: boolean;
	},
	user: IUser,
	originalMsg?: IMessage,
	previewUrls?: string[],
): Promise<void> {
	const originalMessage = originalMsg || (await Messages.findOneById(message._id));
	if (!originalMessage) {
		throw new Error('Invalid message ID.');
	}

	let messageData: IMessage = Object.assign({}, originalMessage, message);

	// For the Rocket.Chat Apps :)
	if (message && Apps.self && Apps.isLoaded()) {
		const prevent = await Apps.self?.triggerEvent(AppEvents.IPreMessageUpdatedPrevent, messageData);
		if (prevent) {
			throw new Meteor.Error('error-app-prevented-updating', 'A Rocket.Chat App prevented the message updating.');
		}

		let result = await Apps.self?.triggerEvent(AppEvents.IPreMessageUpdatedExtend, messageData);
		result = await Apps.self?.triggerEvent(AppEvents.IPreMessageUpdatedModify, result);

		if (typeof result === 'object') {
			Object.assign(messageData, result);
		}
	}

	// If we keep history of edits, insert a new message to store history information
	if (settings.get('Message_KeepHistory')) {
		await Messages.cloneAndSaveAsHistoryById(messageData._id, user as Required<Pick<IUser, '_id' | 'username' | 'name'>>);
	}

	Object.assign(messageData, {
		editedAt: new Date(),
		editedBy: {

View on GitHub (pinned to b2c16d5842)

Solutions

  1. Check which installed Rocket.Chat App returned true from the IPreMessageUpdatedPrevent event and adjust or disable that app's handler.
  2. Review the app logs to find why the app prevented the message update.

When it happens

Trigger: Thrown at apps/meteor/server/lib/messages/updateMessage.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/b9a9c65510ea6b8c. Report an issue: GitHub.