different-ai/openwork · error
Installed version could not be validated for a targeted upda
Error message
Installed version could not be validated for a targeted update.
What it means
Thrown by `targetedStableUpdaterFeed` when `compareVersions(normalizedTarget, currentVersion)` returns null, meaning the currently installed version could not be parsed/compared at all. The updater must know the relationship between installed and target versions to build a safe feed, so an unparseable current version aborts the targeted update.
Source
Thrown at apps/desktop/electron/updater.mjs:172
if (leftPart !== rightPart) return leftPart < rightPart ? -1 : 1;
}
return comparePrereleaseIdentifiers(parsedLeft.prerelease, parsedRight.prerelease);
}
function isVersionNewer(candidate, current) {
const comparison = compareVersions(candidate, current);
return comparison === null ? candidate !== current : comparison > 0;
}
export function targetedStableUpdaterFeed(currentVersion, targetVersion, allowOlder = false) {
const normalizedTarget = normalizeStableTargetVersion(targetVersion);
if (!normalizedTarget) {
throw new Error("Target update version must use the stable x.y.z format.");
}
const comparison = compareVersions(normalizedTarget, currentVersion);
if (comparison === null) {
throw new Error("Installed version could not be validated for a targeted update.");
}
if (comparison === 0 || (!allowOlder && comparison < 0)) {
throw new Error(allowOlder
? "Recovery target version must differ from the installed version."
: "Target update version must be newer than the installed version.");
}
return `https://github.com/different-ai/openwork/releases/download/v${normalizedTarget}`;
}
function updaterChannelState(app, channel, targetVersion = null, manifestChannel = "latest") {
const normalized = normalizeElectronUpdaterChannel(channel, manifestChannel);
const currentVersion = resolveAppVersion(app);
return {
channel: normalized,
feedUrl: targetVersion
? targetedStableUpdaterFeed(currentVersion, targetVersion)
: electronUpdaterFeedUrl(normalized, manifestChannel),
currentVersion,View on GitHub (pinned to 2b7df46e8a)
Solutions
- Pass a valid x.y.z currentVersion (same normalization rules as the target)
- In dev, guard targeted-update code paths or supply a synthetic valid version
- Check where currentVersion originates (app.getVersion()) and why it is malformed
Example fix
// before targetedStableUpdaterFeed(app.getVersion(), target); // dev version like '0.0.0-dev' // after const current = /^\d+\.\d+\.\d+$/.test(app.getVersion()) ? app.getVersion() : '0.0.0'; targetedStableUpdaterFeed(current, target);
Defensive patterns
Strategy: validation
Validate before calling
function currentVersionComparable(v) {
return typeof v === 'string' && /^\d+\.\d+\.\d+$/.test(v);
} Try / catch
try {
const feed = targetedStableUpdaterFeed(current, target);
} catch (e) {
if (e.message.startsWith('Installed version could not be validated')) {
showError('Cannot targeted-update from a dev/unparsed version');
} else throw e;
} Prevention
- Check the installed version parses as x.y.z before enabling targeted updates
- Skip/disable targeted update flows for dev builds
- Log app.getVersion() when the check fails to spot malformed sources
- Validate both current and target versions with the same regex
When it happens
Trigger: Calling targetedStableUpdaterFeed with a currentVersion that compareVersions cannot handle — e.g. a dev build string, empty/null currentVersion, or a non-semver version from app.getVersion() in an unpackaged/dev environment.
Common situations: Running a dev or locally-built app whose version string is not stable x.y.z; corrupted app metadata; test harness passing placeholder version values.
Related errors
- Target update version must use the stable x.y.z format.
- Recovery target version must differ from the installed versi
- Agent context diagnostics timeout must be between 1 ms and 3
- invalid_app_version_payload
- Invalid cloud provider sync response.
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/782f52ec21844a6d.
Report an issue: GitHub.