RocketChat/Rocket.Chat · error · Error
Invalid server info
Error message
Invalid server info
What it means
Thrown by the useServerInfoQueryOptions queryFn when the GET /info response does not contain a `minimumClientVersions` key. The query performs three sequential structural checks against the IWorkspaceInfo contract; the first failing check throws this generic message. This check guards clients that rely on the server advertising minimum required client versions.
Source
Thrown at apps/meteor/client/hooks/useWorkspaceInfo.ts:15
import type { IStats, IWorkspaceInfo, Serialized } from '@rocket.chat/core-typings';
import type { IInstance } from '@rocket.chat/rest-typings';
import { useEndpoint } from '@rocket.chat/ui-contexts';
import { keepPreviousData, useMutation, useQueries, useQuery, useQueryClient } from '@tanstack/react-query';
const useServerInfoQueryOptions = () => {
const getServerInfo = useEndpoint('GET', '/info');
return {
queryKey: ['info', 'serverInfo'],
queryFn: async () => {
const data = await getServerInfo();
if (!('minimumClientVersions' in data)) {
throw new Error('Invalid server info');
}
if (!('info' in data)) {
throw new Error('Invalid server info');
}
if (!('version' in data)) {
throw new Error('Invalid server info');
}
return data as IWorkspaceInfo;
},
staleTime: Infinity,
placeholderData: keepPreviousData,
} as const;
};
export const useServerInfo = () => useQuery(useServerInfoQueryOptions());
export const useWorkspaceInfo = ({ refreshStatistics }: { refreshStatistics?: boolean } = {}) => {View on GitHub (pinned to f9d3ec372b)
Solutions
- Inspect the raw GET /info response in DevTools; a missing minimumClientVersions key indicates an old/patched server.
- Upgrade the server to a version that includes minimumClientVersions in /info.
- If behind a proxy, ensure /info is passed through unchanged.
- In tests/mocks, return the full IWorkspaceInfo shape including minimumClientVersions, info, and version.
Defensive patterns
Strategy: validation
Validate before calling
const data = await getServerInfo();
if (!('minimumClientVersions' in data)) {
throw new Error('Server too old: missing minimumClientVersions');
} Type guard
function hasMinimumClientVersions(d: unknown): d is { minimumClientVersions: unknown } {
return typeof d === 'object' && d !== null && 'minimumClientVersions' in d;
} Try / catch
try {
const info = await useServerInfo();
} catch (e) {
if ((e as Error).message === 'Invalid server info') {
showServerUpgradeRequired();
}
} Prevention
- Upgrade the server to a version that returns the full /info contract.
- Ensure proxies pass /info through unchanged.
- Mock the full IWorkspaceInfo shape in tests.
When it happens
Trigger: The /info endpoint returned a body missing `minimumClientVersions` — e.g. an old server that predates the field, a proxied/modified response, or an error envelope with HTTP 200. Because the check is `!('minimumClientVersions' in data)`, even a null value would pass; only an absent key throws.
Common situations: Client bundle is newer than the server (server too old to advertise minimum versions); a reverse proxy rewriting /info; a non-Rocket.Chat service responding on the same path; testing against a mock that returns a partial /info body.
Related errors
- Invalid response from API
- App not found
- Failed to build external url
- Failed to build App Request external url
- Failed to get categories
AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12).
Data as JSON: /api/errors/9f016c78c5c1150f.
Report an issue: GitHub.