RocketChat/Rocket.Chat · warning · Error

Command does not exist in the system currently (or it is…

Error message

Command does not exist in the system currently (or it is disabled): "${cmd}"

What it means

The /assets/ listener serves admin-managed branding assets. If the requested asset exists and declares constraints.extensions, asking for it in a format not on that list returns a bodyless 403. For example, requesting /assets/logo.jpg when the logo asset only permits svg/png is rejected before any file lookup.

Solutions

  1. Request the asset with an allowed extension (usually .svg or .png) or no extension at all
  2. Update templates and stored links to the extension the asset was uploaded with
  3. If a new format is genuinely needed, re-register/re-upload the asset with expanded constraints.extensions

Example fix

<!-- before -->
<img src="/assets/logo.jpg" />
<!-- after -->
<img src="/assets/logo.svg" />
Defensive patterns

Strategy: validation

Validate before calling

const ALLOWED = ['svg', 'png'];
const assetUrl = (key: string, ext: string) => (ALLOWED.includes(ext) ? `/assets/${key}.${ext}` : `/assets/${key}.svg`);

Type guard

const isAllowedExtension = (ext: string, allowed: string[]): boolean => allowed.includes(ext);

Prevention

When it happens

Trigger: GET /assets/<key>.<ext> where <ext> is not in the asset's constraints.extensions array (e.g. .jpg, .ico, .gif for a logo that only allows svg/png); templates or CDNs deriving the extension from an unrelated source.

Common situations: Themes/templates hardcoding formats like .jpg or .ico for assets that only accept svg/png; apps registering assets with narrow constraints; clients guessing formats from user uploads.

Related errors


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

Appendix: source

Thrown at apps/meteor/app/apps/server/bridges/commands.ts:82

		if (typeof commandObj === 'undefined') {
			throw new Error(`Command does not exist in the system currently: "${cmd}"`);
		}

		this.disabledCommands.set(cmd, commandObj);
		delete slashCommands.commands[cmd];

		void this.orch.getNotifier().commandDisabled(cmd);
	}

	// command: { command, paramsExample, i18nDescription, executor: function }
	protected async modifyCommand(command: ISlashCommand, appId: string): Promise<void> {
		this.orch.debugLog(`The App ${appId} is attempting to modify the command: "${command}"`);

		this._verifyCommand(command);

		const cmd = command.command.toLowerCase();
		if (typeof slashCommands.commands[cmd] === 'undefined') {
			throw new Error(`Command does not exist in the system currently (or it is disabled): "${cmd}"`);
		}

		const item = slashCommands.commands[cmd];

		item.params = command.i18nParamsExample ? command.i18nParamsExample : item.params;
		item.description = command.i18nDescription ? command.i18nDescription : item.params;
		item.callback = this._appCommandExecutor.bind(this);
		item.providesPreview = command.providesPreview;
		item.previewer = command.previewer ? this._appCommandPreviewer.bind(this) : item.previewer;
		item.previewCallback = (
			command.executePreviewItem ? this._appCommandPreviewExecutor.bind(this) : item.previewCallback
		) as (typeof slashCommands.commands)[string]['previewCallback'];

		slashCommands.commands[cmd] = item;
		void this.orch.getNotifier().commandUpdated(cmd);
	}

	protected async registerCommand(command: ISlashCommand, appId: string): Promise<void> {

View on GitHub (pinned to b2c16d5842)