{"record":{"id":"5cdf7f7f8cb2cef5","repo":"RocketChat/Rocket.Chat","slug":"integration-scripts-isolated-vm-disabled","errorCode":null,"errorMessage":"integration-scripts-isolated-vm-disabled","messagePattern":"integration-scripts-isolated-vm-disabled","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/lib/integrations/lib/validateScriptEngine.ts","lineNumber":19,"sourceCode":"import type { IntegrationScriptEngine } from '@rocket.chat/core-typings';\nimport { wrapExceptions } from '@rocket.chat/tools';\n\nconst FREEZE_INTEGRATION_SCRIPTS_VALUE = String(process.env.FREEZE_INTEGRATION_SCRIPTS).toLowerCase();\nconst FREEZE_INTEGRATION_SCRIPTS = ['yes', 'true'].includes(FREEZE_INTEGRATION_SCRIPTS_VALUE);\n\nexport const validateScriptEngine = (engine?: IntegrationScriptEngine) => {\n\tif (FREEZE_INTEGRATION_SCRIPTS) {\n\t\tthrow new Error('integration-scripts-disabled');\n\t}\n\n\tif (engine && engine !== 'isolated-vm') {\n\t\tthrow new Error('integration-scripts-unknown-engine');\n\t}\n\n\tconst engineCode = 'ivm';\n\n\tif (engineCode === FREEZE_INTEGRATION_SCRIPTS_VALUE) {\n\t\tthrow new Error('integration-scripts-isolated-vm-disabled');\n\t}\n\n\treturn true;\n};\n\nexport const isScriptEngineFrozen = (engine?: IntegrationScriptEngine) =>\n\twrapExceptions(() => !validateScriptEngine(engine)).catch(() => true);\n","sourceCodeStart":1,"sourceCodeEnd":27,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/integrations/lib/validateScriptEngine.ts#L1-L27","documentation":"validateScriptEngine throws this plain Error when the environment variable FREEZE_INTEGRATION_SCRIPTS is exactly 'ivm'. This value is distinct from the blanket 'yes'/'true' freeze: it specifically disables the isolated-vm engine — which is currently the only engine — so the practical effect is that integration scripts cannot run while everything else keeps working. Any call validating the engine (save or execute) aborts.","triggerScenarios":"Server started with FREEZE_INTEGRATION_SCRIPTS=ivm and then any attempt to save an integration with a Script or to execute an existing scripted integration; the constant engineCode 'ivm' is compared against the lowercased env value, so 'IVM' also matches after lowercasing.","commonSituations":"Rocket.Chat 9.x-style deployments where integrations are frozen but the flag is set to the engine code rather than 'yes'; operators copying freeze examples from release notes; checking configuration after upgrade and mistaking 'ivm' for an engine selector.","solutions":["Change the variable to re-enable scripting: FREEZE_INTEGRATION_SCRIPTS=no (or unset it) and restart","If freezing is intended, remove Script usage from integrations instead — the flag stays and the error disappears because no engine is validated","Use the exported isScriptEngineFrozen() helper (or check the env value) to detect this state programmatically"],"exampleFix":"# before\nFREEZE_INTEGRATION_SCRIPTS=ivm\n\n# after\nFREEZE_INTEGRATION_SCRIPTS=no  # or remove the variable entirely","handlingStrategy":"validation","validationCode":"if (String(process.env.FREEZE_INTEGRATION_SCRIPTS ?? '').toLowerCase() === 'ivm') {\n  throw new Error('isolated-vm integration scripts are frozen in this deployment');\n}","typeGuard":null,"tryCatchPattern":"try {\n  validateScriptEngine(engine);\n} catch (err) {\n  if (err instanceof Error && err.message === 'integration-scripts-isolated-vm-disabled') {\n    // FREEZE_INTEGRATION_SCRIPTS=ivm: only engine is disabled; drop scripts or change the env\n  } else {\n    throw err;\n  }\n}","preventionTips":["Treat 'ivm' as a freeze value, not an engine selector, when configuring FREEZE_INTEGRATION_SCRIPTS","Surface isScriptEngineFrozen() in health checks so scripted integrations fail loudly at deploy time, not at runtime"],"tags":["integrations","script-engine","environment-variable","isolated-vm"],"backgroundTag":"feature-disabled-by-env-flag","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}