can1357/oh-my-pi · warning · Error
GitHub release ${expectedTag} is a prerelease; only canary u
Error message
GitHub release ${expectedTag} is a prerelease; only canary updates install prerelease assets What it means
By default the updater only installs published stable releases. resolveReleaseBinaryAsset rejects a release whose prerelease flag is true unless options.allowPrerelease is set — the canary channel passes that flag since canary GitHub releases are published as prereleases. The exact-tag match still pins the download even for prereleases.
Source
Thrown at packages/coding-agent/src/cli/update-cli.ts:206
* still pins the download to the specific requested version.
*/
export function resolveReleaseBinaryAsset(
release: unknown,
expectedTag: string,
binaryName: string,
options: { allowPrerelease?: boolean } = {},
): ReleaseBinaryAsset {
if (!isRecord(release)) {
throw new Error("Invalid GitHub release metadata");
}
if (release.tag_name !== expectedTag) {
throw new Error(`GitHub release tag mismatch: expected ${expectedTag}`);
}
if (release.draft !== false) {
throw new Error(`GitHub release ${expectedTag} is a draft, not a published release`);
}
if (release.prerelease !== false && !options.allowPrerelease) {
throw new Error(`GitHub release ${expectedTag} is a prerelease; only canary updates install prerelease assets`);
}
if (!Array.isArray(release.assets)) {
throw new Error(`GitHub release ${expectedTag} has no asset list`);
}
const matches = release.assets.filter(asset => isRecord(asset) && asset.name === binaryName);
if (matches.length !== 1) {
throw new Error(`GitHub release ${expectedTag} has ${matches.length} assets named ${binaryName}`);
}
const asset = matches[0];
if (!isRecord(asset) || asset.state !== "uploaded") {
throw new Error(`GitHub release asset ${binaryName} is not fully uploaded`);
}
if (typeof asset.size !== "number" || !Number.isSafeInteger(asset.size) || asset.size <= 0) {
throw new Error(`GitHub release asset ${binaryName} has an invalid size`);
}
if (typeof asset.digest !== "string") {View on GitHub (pinned to 9690622007)
Solutions
- Wait for the stable (non-prerelease) release and retry the update.
- Switch to the canary update channel, which sets allowPrerelease and installs prerelease assets for its exact tags.
- If you intended a specific prerelease tag, use the channel path that supports prereleases rather than the stable updater.
- Check the releases page to confirm the release's prerelease status.
Defensive patterns
Strategy: validation
Validate before calling
if (release.prerelease === true && !allowPrerelease) {
throw new Error(`${release.tag_name} is a prerelease; use the canary channel to install it`);
} Type guard
function isStableOrAllowed(v: { prerelease: boolean }, allowPrerelease: boolean): boolean {
return v.prerelease === false || allowPrerelease;
} Try / catch
try {
const asset = resolveReleaseBinaryAsset(release, expectedTag, binaryName, { allowPrerelease });
} catch (err) {
if (err instanceof Error && err.message.includes("is a prerelease")) {
console.error("Stable updater hit a prerelease; switch to canary or wait for stable.");
}
throw err;
} Prevention
- Match the update channel to the release kind: canary channel for prereleases, stable otherwise.
- Wait for the stable cut instead of chasing freshly marked prereleases.
- In CI, pin stable tags and avoid latest-prerelease lookups.
- Pass allowPrerelease only in canary-specific code paths.
When it happens
Trigger: Running a stable `omp update` while the resolved latest release is marked prerelease on GitHub; using a channel configuration that resolves to a prerelease tag without enabling allowPrerelease; testing a canary tag through the stable update path.
Common situations: A hotfix shipped first as a prerelease and the stable updater picks it up; users manually requesting a canary version through the stable channel; release marked prerelease after a re-publish.
Related errors
- Invalid GitHub release metadata
- GitHub release tag mismatch: expected ${expectedTag}
- GitHub release ${expectedTag} is a draft, not a published re
- GitHub release ${expectedTag} has no asset list
- GitHub release ${expectedTag} has ${matches.length} assets n
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/7fc736b899b2446a.
Report an issue: GitHub.