RocketChat/Rocket.Chat · error
Invalid response from the Marketplace
Error message
Invalid response from the Marketplace
What it means
Thrown when the marketplace metadata response for a specific app version is valid JSON but not the expected shape: an array with exactly one element. The cloud v1/apps/:appId?appVersion=:version endpoint is documented (per the code comment) to return a one-element array of marketplace info; anything else means the marketplace answered with an error envelope or a different payload, which is logged ('Error getting app information from marketplace') before throwing.
Solutions
- Check the server log entry 'Error getting app information from marketplace' — it dumps marketplaceInfo, showing exactly what the cloud returned.
- Retry with a known-good published version of the app (list versions via GET v1/apps/:appId).
- If every app fails, the cloud contract or the workspace registration is off: re-sync the workspace (Administration -> Connectivity Services) and upgrade Rocket.Chat to the latest patch so client and cloud API versions match.
- Report to Rocket.Chat support if the dumped payload shows a cloud-side error for a version that clearly exists.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await installFromMarketplace(appId, version);
} catch (e) {
if (e instanceof Error && e.message === 'Invalid response from the Marketplace') {
// check server log for the dumped marketplaceInfo payload; retry with a confirmed version
}
} Prevention
- Prefer latest published versions over hardcoded old version strings.
- Keep server and cloud API generations in sync by staying on supported releases.
- Log and report the marketplace payload whenever this fires — the shape tells you if it is a version issue or a cloud incident.
When it happens
Trigger: POST marketplace-install where marketplaceResponse.json() yields an object (e.g. { error: ... }), an empty array, or multiple entries — typically because the requested appVersion was not found and the cloud returned its error object, or an API contract change. The zip content-type check (164) has already passed when this fires.
Common situations: Installing an old/unpublished/pulled app version so the cloud responds with an error object instead of a one-item array; cloud API schema drift after a cloud-side update; requesting a version while the marketplace index is mid-replication returning zero entries.
Related errors
- App metadata download failed
- App package download failed
- Invalid url. It doesn't exist or is not "application/zip".
- Marketplace_Failed_To_Fetch_Apps
- Marketplace_Failed_To_Fetch_Categories
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/e42c4e0f655607ea.
Report an issue: GitHub.
Appendix: source
Thrown at apps/meteor/ee/server/apps/communication/rest.ts:337
ignoreSsrfValidation: true,
})
.catch((cause) => {
throw new Error('App metadata download failed', { cause });
}),
]);
if (downloadResponse.headers.get('content-type') !== 'application/zip') {
throw new Error('Invalid url. It doesn\'t exist or is not "application/zip".');
}
buff = Buffer.from(await downloadResponse.arrayBuffer());
marketplaceInfo = await marketplaceResponse.json();
// Note: marketplace responds with an array of the marketplace info on the app, but it is expected
// to always have one element since we are fetching a specific app version.
if (!Array.isArray(marketplaceInfo) || marketplaceInfo?.length !== 1) {
orchestrator.getRocketChatLogger().error({ msg: 'Error getting app information from marketplace', marketplaceInfo });
throw new Error('Invalid response from the Marketplace');
}
permissionsGranted = this.bodyParams.permissionsGranted;
} catch (err: unknown) {
let message;
if (err instanceof Error) {
orchestrator.getRocketChatLogger().error({ msg: 'Error installing app from marketplace:', err });
message = err.message;
} else {
message = err;
}
return API.v1.failure({ error: message });
}
} else {
const app = await getUploadFormData(
{View on GitHub (pinned to b2c16d5842)