RocketChat/Rocket.Chat · error · Error

Invalid attachment field, title and value is required

Error message

Invalid attachment field, title and value is required

What it means

Error "Invalid attachment field, title and value is required" thrown in RocketChat/Rocket.Chat.

Source

Thrown at apps/meteor/server/lib/messages/sendMessage.ts:88

				}
			}
		});

		return true;
	});

const validateAttachmentsFields = (attachmentField: any) => {
	check(
		attachmentField,
		objectMaybeIncluding({
			short: Boolean,
			title: String,
			value: Match.OneOf(String, Number, Boolean),
		}),
	);

	if (!attachmentField.value || !attachmentField.title) {
		throw new Error('Invalid attachment field, title and value is required');
	}
};

const validateAttachmentsActions = (attachmentActions: any) => {
	check(
		attachmentActions,
		objectMaybeIncluding({
			type: String,
			text: String,
			url: validFullURLParam,
			image_url: validFullURLParam,
			is_webview: Boolean,
			webview_height_ratio: String,
			msg: String,
			msg_in_chat_window: Boolean,
		}),
	);
};

View on GitHub (pinned to b2c16d5842)

Solutions

  1. Ensure every attachment field includes both a title and a value before sending the message.
  2. Remove attachment fields that have an empty title or value.

When it happens

Trigger: Thrown at apps/meteor/server/lib/messages/sendMessage.ts:88 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/26e306ebc49812c0. Report an issue: GitHub.