RocketChat/Rocket.Chat · warning

Integration called without owner data

Error message

Integration called without owner data

What it means

Intended guard for the roomCreated event: mapEventArgsToData builds the webhook payload from the room owner (user_id, user_name, owner object), and warns then skips the POST when owner is missing. Note that the earlier !room || !message guard in the same function usually fires first for roomCreated, because that event never carries a message (see error 1954).

Source

Thrown at apps/meteor/server/lib/integrations/lib/triggerHandler.ts:321

				data.timestamp = message.ts;
				data.user_id = message.u._id;
				data.user_name = message.u.username;
				data.text = message.msg;
				data.user = userWithoutServicesField;
				data.room = room;
				data.message = message;

				if (message.alias) {
					data.alias = message.alias;
				}

				if (message.bot) {
					data.bot = Boolean(message.bot); // TODO: need to double check this, since it makes no sense
				}
				break;
			case 'roomCreated':
				if (!owner) {
					outgoingLogger.warn({ msg: 'Integration called without owner data', event });
					return;
				}
				data.channel_id = room._id;
				data.channel_name = room.name;
				data.timestamp = room.ts;
				data.user_id = owner._id;
				data.user_name = owner.username;
				data.owner = ownerWithoutServicesField;
				data.room = room;
				break;
			case 'roomArchived':
			case 'roomJoined':
			case 'roomLeft':
				if (!user) {
					outgoingLogger.warn({ msg: 'Integration called without owner data', event });
					return;
				}
				data.timestamp = new Date();

View on GitHub (pinned to b2c16d5842)

Solutions

  1. Emit roomCreated with its full signature: (event, owner, room)
  2. Check the debug line 'Got the event arguments for the event' - a missing userId indicates the owner did not arrive
  3. For dependable webhooks use sendMessage events, which carry full context
  4. Patch the upstream guards in a fork if roomCreated deliveries are a hard requirement
Defensive patterns

Strategy: validation

Validate before calling

// Defensive emission: only fire when the payload is complete
if (event === 'roomCreated' && owner && room) {
  executeTriggers('roomCreated', owner, room);
}

Type guard

const hasOwner = (args: { owner?: IUser }): args is { owner: IUser } => !!args.owner;

Prevention

When it happens

Trigger: executeTriggers invoked for roomCreated with fewer than the expected three arguments (event, owner, room), leaving argObject.owner undefined - e.g. custom emission code with wrong arity.

Common situations: Custom forks emitting roomCreated with missing or mis-ordered arguments; refactors that changed the emission signature without updating this consumer.

Related errors


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