different-ai/openwork · error
Desktop version metadata was incomplete.
Error message
Desktop version metadata was incomplete.
What it means
After an ok response from /v1/app-version, loadDesktopVersionOptions runs getDesktopVersionMetadata on the payload; if it cannot extract the expected metadata shape, this error is thrown. It distinguishes a well-formed HTTP response from one whose body lacks the required version fields.
Source
Thrown at ee/apps/den-web/app/(den)/dashboard/_components/org-settings-screen.tsx:322
try {
const { response, payload } = await requestJson(
"/v1/app-version",
{ method: "GET" },
12000,
);
if (!response.ok) {
throw new Error(
getErrorMessage(
payload,
`Failed to load desktop version metadata (${response.status}).`,
),
);
}
const metadata = getDesktopVersionMetadata(payload);
if (!metadata) {
throw new Error("Desktop version metadata was incomplete.");
}
if (cancelled) {
return;
}
setDesktopVersionOptions(metadata.publishedDesktopVersions);
setDesktopVersionRange({
minVersion: metadata.minAppVersion,
maxVersion: metadata.latestAppVersion,
});
} catch (error) {
if (!cancelled) {
setDesktopVersionOptions([]);
setDesktopVersionRange(null);
setDesktopVersionOptionsError(
error instanceof Error
? error.messageView on GitHub (pinned to 2b7df46e8a)
Solutions
- Log the raw payload and compare it with what getDesktopVersionMetadata expects (field names/types)
- Align frontend and server versions — redeploy the side that is behind
- Bypass proxies/CDN for this route to rule out body rewriting
- Add unit coverage for getDesktopVersionMetadata against the actual server payload
Example fix
// before
const metadata = getDesktopVersionMetadata(payload);
if (!metadata) {
throw new Error("Desktop version metadata was incomplete.");
}
// after
const metadata = getDesktopVersionMetadata(payload);
if (!metadata) {
console.error('app-version payload', payload);
throw new Error(`Desktop version metadata was incomplete: ${JSON.stringify(payload).slice(0, 200)}`);
} Defensive patterns
Strategy: validation
Validate before calling
function looksLikeVersionMetadata(payload: unknown): boolean {
return isRecord(payload) && isRecord(payload.metadata) && typeof payload.metadata.latestVersion === 'string';
}
// if false, fall back to defaults instead of throwing Type guard
const isDesktopVersionMetadata = (p: unknown): p is { metadata: Record<string, unknown> } =>
isRecord(p) && isRecord(p.metadata); Try / catch
try {
const metadata = getDesktopVersionMetadata(payload);
if (!metadata) throw new Error('Desktop version metadata was incomplete.');
} catch (err) {
console.warn('app-version metadata unusable, using defaults', payload);
applyDefaultVersionOptions();
} Prevention
- Validate the /v1/app-version body shape with a contract test, not just the status code
- Log the raw payload when getDesktopVersionMetadata returns null
- Keep version-metadata parsing in a shared module tested against real server fixtures
- Deploy web and den-api together when metadata fields change
When it happens
Trigger: Server returned 200 but the body is missing or malformed version metadata (e.g. null metadata, wrong field names after an API change, an empty JSON object, or a proxy-inserted body).
Common situations: Version skew between web app and den-api after the metadata schema changed; partial deploy where the endpoint exists but returns a stub body; custom middleware returning an empty 200 on the version route.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- invalid_app_version_payload
- GitHub plugin preview response was incomplete.
- The dashboard response was invalid.
- invalid_session_payload
- invalid_resource_snapshot_payload
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/22c39cd3c278bc8a.
Report an issue: GitHub.