RocketChat/Rocket.Chat · error · Error

integration-scripts-disabled

Error message

integration-scripts-disabled

What it means

validateScriptEngine throws this plain Error when the environment variable FREEZE_INTEGRATION_SCRIPTS is 'yes' or 'true' (case-insensitive). This deployment mode freezes integration scripting entirely — no integration may declare or run a Script — so any code path that validates a script engine (saving integrations with scripts, executing Prepare/Process scripts) aborts. The companion helper isScriptEngineFrozen() reports the state without throwing.

Source

Thrown at apps/meteor/server/lib/integrations/lib/validateScriptEngine.ts:9

import type { IntegrationScriptEngine } from '@rocket.chat/core-typings';
import { wrapExceptions } from '@rocket.chat/tools';

const FREEZE_INTEGRATION_SCRIPTS_VALUE = String(process.env.FREEZE_INTEGRATION_SCRIPTS).toLowerCase();
const FREEZE_INTEGRATION_SCRIPTS = ['yes', 'true'].includes(FREEZE_INTEGRATION_SCRIPTS_VALUE);

export const validateScriptEngine = (engine?: IntegrationScriptEngine) => {
	if (FREEZE_INTEGRATION_SCRIPTS) {
		throw new Error('integration-scripts-disabled');
	}

	if (engine && engine !== 'isolated-vm') {
		throw new Error('integration-scripts-unknown-engine');
	}

	const engineCode = 'ivm';

	if (engineCode === FREEZE_INTEGRATION_SCRIPTS_VALUE) {
		throw new Error('integration-scripts-isolated-vm-disabled');
	}

	return true;
};

export const isScriptEngineFrozen = (engine?: IntegrationScriptEngine) =>
	wrapExceptions(() => !validateScriptEngine(engine)).catch(() => true);

View on GitHub (pinned to b2c16d5842)

Solutions

  1. If scripting must stay enabled, set FREEZE_INTEGRATION_SCRIPTS=no (or unset it) in the deployment environment and restart the server
  2. Otherwise remove the Script from the integration and move the logic into the receiving service (an external middleware that the webhook calls)
  3. Use Apps Engine (Rocket.Chat Apps) as the supported replacement for integration scripts
  4. Before shipping code that depends on scripts, call isScriptEngineFrozen() to branch behavior

Example fix

# before — docker-compose.yml
environment:
  - FREEZE_INTEGRATION_SCRIPTS=yes

# after
environment:
  - FREEZE_INTEGRATION_SCRIPTS=no
# then restart; or clear the Script field in Admin -> Integrations
Defensive patterns

Strategy: validation

Validate before calling

import { isScriptEngineFrozen } from './validateScriptEngine';

if (await isScriptEngineFrozen()) {
  throw new Error('integration scripts are frozen (FREEZE_INTEGRATION_SCRIPTS) — do not save scripted integrations');
}

Try / catch

try {
  validateScriptEngine(engine);
} catch (err) {
  if (err instanceof Error && err.message === 'integration-scripts-disabled') {
    // deployment has FREEZE_INTEGRATION_SCRIPTS=yes|true; skip script features gracefully
  } else {
    throw err;
  }
}

Prevention

When it happens

Trigger: Saving a new or existing integration that has a Script while the server runs with FREEZE_INTEGRATION_SCRIPTS=yes (or =true); also any server-side code calling validateScriptEngine() directly, e.g. when the trigger handler instantiates the engine for a scripted integration. Values are lowercased, so 'YES' and 'True' also trigger it.

Common situations: Rocket.Chat 9.x deployments where integration scripts are frozen by default (official images set the flag) after the vm2 removal; hardened/self-hosted installs opting out of script execution; upgrading a workspace that relied heavily on integration scripts.

Related errors


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