{"record":{"id":"95aea4cff922e62d","repo":"RocketChat/Rocket.Chat","slug":"marketplace-invalid-apps-engine-version","errorCode":null,"errorMessage":"Marketplace_Invalid_Apps_Engine_Version","messagePattern":"Marketplace_Invalid_Apps_Engine_Version","errorType":"error_code","errorClass":"MarketplaceAppsError","httpStatus":null,"severity":"error","filePath":"apps/meteor/ee/server/apps/marketplace/fetchMarketplaceApps.ts","lineNumber":186,"sourceCode":"\t}\n\n\tif (request.status === 200) {\n\t\tconst response = await request.json();\n\t\tfetchMarketplaceAppsSchema.parse(response);\n\t\treturn response;\n\t}\n\n\tconst response = await request.json();\n\n\tApps.getRocketChatLogger().error({ msg: 'Error fetching marketplace apps', status: request.status, response });\n\n\t// TODO: Refactor cloud to return a proper error code on unsupported version\n\tif (request.status === 426 && 'errorMsg' in response && response.errorMsg === 'unsupported version') {\n\t\tthrow new MarketplaceUnsupportedVersionError();\n\t}\n\n\tif (request.status === 400 && response.code === 200) {\n\t\tthrow new MarketplaceAppsError('Marketplace_Invalid_Apps_Engine_Version');\n\t}\n\n\tconst INTERNAL_MARKETPLACE_ERROR_CODES = [266, 256, 166, 221, 257, 320];\n\n\tif (request.status === 500 && INTERNAL_MARKETPLACE_ERROR_CODES.includes(response.code)) {\n\t\tthrow new MarketplaceAppsError('Marketplace_Internal_Error');\n\t}\n\n\tthrow new MarketplaceAppsError('Marketplace_Failed_To_Fetch_Apps');\n}\n","sourceCodeStart":168,"sourceCodeEnd":197,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/ee/server/apps/marketplace/fetchMarketplaceApps.ts#L168-L197","documentation":"Thrown by fetchMarketplaceApps when the marketplace responds with HTTP 400 AND response.code === 200. Maps to MarketplaceAppsError('Marketplace_Invalid_Apps_Engine_Version'). The code 200 here is a marketplace-internal error code (not HTTP), indicating the Apps Engine version reported by the workspace does not match what the marketplace expects for its apps.","triggerScenarios":"Calling fetchMarketplaceApps() when the workspace's Apps Engine framework version is incompatible with the marketplace's current app catalogue requirements. The marketplace returns 400 with its internal code 200.","commonSituations":"Apps Engine version drift after a partial upgrade; running a fork or custom build reporting a non-standard framework version; marketplace raised the required Apps Engine version; downgrade left the engine version mismatched.","solutions":["Update Rocket.Chat (and thus the bundled Apps Engine) to align with marketplace requirements.","Verify the Apps Engine framework version in Administration > Apps and compare with marketplace-supported versions.","Avoid forks that misreport the engine version.","If upgrading is blocked, install apps via offline zip upload."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"async function appsEngineVersionCompatible(): Promise<boolean> {\n  // compare bundled Apps Engine framework version against marketplace requirements\n  const frameworkVersion = Apps.getRocketChatAppSdkInfo()?.frameworkVersion;\n  return isSupportedByMarketplace(frameworkVersion);\n}","typeGuard":"import { MarketplaceAppsError } from './marketplaceErrors';\n\nconst isInvalidAppsEngineVersion = (e: unknown): e is MarketplaceAppsError =>\n  e instanceof MarketplaceAppsError && e.message === 'Marketplace_Invalid_Apps_Engine_Version';","tryCatchPattern":"try {\n  return await fetchMarketplaceApps();\n} catch (e) {\n  if (e instanceof MarketplaceAppsError && e.message === 'Marketplace_Invalid_Apps_Engine_Version') {\n    notifyAdminToUpdateAppsEngine();\n    return [];\n  }\n  throw e;\n}","preventionTips":["Keep the Apps Engine framework version aligned with marketplace requirements (upgrade Rocket.Chat).","Do not run forks that misreport the framework version.","Surface a clear 'update required' message to the admin on this error.","Fall back to offline app installation if upgrade is blocked."],"tags":["marketplace","apps-engine","version","compatibility"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}