RocketChat/Rocket.Chat · error · Error
invalid-license
invalid-license
Error message
invalid-license
What it means
The app's first marketplaceInfo entry marks it isEnterpriseOnly, and License.hasValidLicense() is false (no license applied, or it is expired/invalid). Enterprise-only marketplace apps refuse to enable without a valid license.
Solutions
- Apply a valid Enterprise license (Administration -> License)
- If the license exists but is rejected, verify its signature/dates and re-apply a current one
- Use a non-enterprise alternative app if licensing is not an option
Defensive patterns
Strategy: validation
Validate before calling
import { License } from '@rocket.chat/license';
const isEnterpriseOnly = Boolean(app.marketplaceInfo?.[0]?.isEnterpriseOnly);
if (isEnterpriseOnly && !License.hasValidLicense()) {
// hide/lock the enable action with an enterprise-license prompt
}
await Apps.enableApp(appId); Try / catch
try {
await Apps.enableApp(appId);
} catch (err) {
if (err instanceof Error && err.message === 'invalid-license') {
// prompt for a valid enterprise license
} else {
throw err;
}
} Prevention
- Mark enterprise-only apps in listings before the user attempts to enable them
- Validate the license state after renewal to avoid silent invalidity
- Prefer non-enterprise alternatives on Community workloads
When it happens
Trigger: Enabling an enterprise-only marketplace app on an unlicensed (Community) workspace or one whose license has expired.
Common situations: Community edition installing an enterprise app from the marketplace; license removed or expired after the app was previously enabled and then disabled.
Related errors
- app-addon-not-valid
- Failed to parse app.json
- license-prevented
- Marketplace_Invalid_Apps_Engine_Version
- No app.json file found in the zip
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/7f117fae27ca041a.
Report an issue: GitHub.
Appendix: source
Thrown at apps/meteor/ee/server/lib/license/canEnableApp.ts:43
throw new Error('app-addon-not-valid');
}
const source = getInstallationSourceFromAppStorageItem(app);
switch (source) {
case 'private':
if (await License.shouldPreventAction('privateApps')) {
throw new Error('license-prevented');
}
break;
default:
if (await License.shouldPreventAction('marketplaceApps')) {
throw new Error('license-prevented');
}
const marketplaceInfo = app.marketplaceInfo?.[0];
if (marketplaceInfo?.isEnterpriseOnly && !License.hasValidLicense()) {
throw new Error('invalid-license');
}
break;
}
};
export const canEnableApp = async (app: IAppStorageItem): Promise<void> => _canEnableApp({ Apps, License }, app);
View on GitHub (pinned to b2c16d5842)