{"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":"exception","errorClass":"MarketplaceAppsError","httpStatus":400,"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/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/ee/server/apps/marketplace/fetchMarketplaceApps.ts#L168-L197","documentation":"MarketplaceAppsError with code 'Marketplace_Invalid_Apps_Engine_Version', thrown when the apps-list fetch returns HTTP 400 with body code 200 — the cloud's overloaded way of saying the server's Apps Engine version is incompatible with the marketplace (e.g. the apps framework version sent is no longer accepted for browsing/installing apps). Distinct from 170 (426 unsupported server version) and 172 (cloud internal errors).","triggerScenarios":"Browsing or syncing marketplace apps from a server whose apps-engine framework version is outside the range the cloud accepts: usually old 1.x/2.x engine builds behind a much newer cloud, or a mismatch after partial upgrades where apps-engine was not updated with the server.","commonSituations":"Server upgraded but apps-engine package pinned/frozen by a fork; very old installs attempting marketplace sync; community builds with dev version strings; cloud raising minimum engine version after deprecation.","solutions":["Upgrade Rocket.Chat (which bundles the matching apps-engine) to a supported release and retry the marketplace listing.","Confirm apps-engine version consistency (no manually pinned @rocket.chat/apps-engine in a fork build).","As a workaround, install the specific app zip manually if the app itself still supports your engine.","If on the latest version already, clear cloud cache by re-syncing Connectivity Services and file an issue — it may be a cloud-side regression."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const apps = await fetchMarketplaceApps();\n} catch (e) {\n  if (e instanceof MarketplaceAppsError && e.message === 'Marketplace_Invalid_Apps_Engine_Version') {\n    // permanent incompatibility: upgrade server/apps-engine; fall back to manual zip install\n  }\n}","preventionTips":["Never pin an older apps-engine when upgrading the server core; keep them as one unit.","Test marketplace browsing in CI for fork builds using the real version string you ship.","Watch cloud deprecation notices for engine version minimums."],"tags":["marketplace","apps-engine","versioning","cloud","enterprise"],"backgroundTag":"incompatible-apps-engine-version","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}