can1357/oh-my-pi · error · Error

${steps.manager} update did not produce a working launcher a

Error message

${steps.manager} update did not produce a working launcher and binary repair failed: ${err}

What it means

Thrown during a bun/npm package-manager update when the freshly installed launcher fails version verification AND the fallback standalone-binary repair (`steps.repair`) also throws. The package-manager install is abandoned, the install is no longer package-manager-managed, and this error reports both the repair failure and the original cause (`cause` carries installError ?? err).

Source

Thrown at packages/coding-agent/src/cli/update-cli.ts:1644

		installError === undefined && result.actual !== undefined && compareVersions(result.actual, release.version) < 0;
	const launcherNeedsRepair = !result.ok && (launcherIsBroken || launcherIsOlder);
	if (!launcherNeedsRepair) {
		if (installError) throw installError;
		printVerificationResult(result, release.version);
		return;
	}
	if (!launcherPath) {
		throw installError ?? new Error(formatVerificationFailure(result, release.version));
	}
	console.log(
		chalk.yellow(
			`\n${steps.manager} did not install a working ${APP_NAME} ${release.version} launcher (${formatVerificationFailure(result, release.version)}); installing the standalone binary at ${launcherPath}.`,
		),
	);
	try {
		await steps.repair(launcherPath);
	} catch (err) {
		throw new Error(`${steps.manager} update did not produce a working launcher and binary repair failed: ${err}`, {
			cause: installError ?? err,
		});
	}
	console.log(
		chalk.yellow(
			`This install is no longer managed by ${steps.manager}. Removing the old global package may delete this launcher; if it does, reinstall with: ${installerHint()}`,
		),
	);
}

async function updateViaHomebrew(expectedVersion: string, force: boolean): Promise<void> {
	console.log(chalk.dim("Updating Homebrew formulae..."));
	const update = await $`brew update`.nothrow();
	if (update.exitCode !== 0) {
		throw new Error(`brew update failed with exit code ${update.exitCode}`);
	}

	console.log(chalk.dim("Updating via Homebrew..."));

View on GitHub (pinned to 9690622007)

Solutions

  1. Read the `cause` of this error — it holds the original verification or repair failure
  2. Check network access to the release/binary download host
  3. Run the standalone installer manually to replace the launcher
  4. Remove the stale global package and reinstall from scratch (`bun install -g`/`npm install -g` the new package name)
  5. Verify the launcher on PATH actually points to the manager's bin dir (`which <app>`)

Example fix

// diagnose with cause
try {
	await updateSelf();
} catch (err) {
	console.error(err.message, err.cause); // cause holds installError/repair err
}
// or skip the manager and install the standalone binary directly
Defensive patterns

Strategy: fallback

Validate before calling

// precondition: manager install + network to binary host
const dl = await fetch(BINARY_RELEASE_URL, { method: "HEAD" });
if (!dl.ok) throw new Error("binary repair download unavailable; fix network first");

Type guard

function hasRepairTarget(steps: ManagerUpdateSteps): steps is ManagerUpdateSteps & { repair: (p: string) => Promise<void> } {
	return typeof steps.repair === "function";
}

Try / catch

try {
	await updateViaManager(steps, release);
} catch (err) {
	const root = err.cause ?? err; // original install/verification error
	logger.error("manager update failed", { message: err.message, cause: String(root) });
	// fall back to standalone installer
}

Prevention

When it happens

Trigger: `updateViaManager` runs: (1) verification of the new launcher fails (wrong version, broken shim, PATH pointing at a stale launcher), then (2) the binary-repair step (downloading/installing the standalone binary at launcherPath) itself throws — e.g. download failure, checksum mismatch, or write permission denied.

Common situations: Renamed/migrated packages where the manager installs an old cached version; partial network failure mid-update; antivirus or permissions blocking the binary write; GCM/GitHub release asset download failure.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/56bb7a62434aab8d. Report an issue: GitHub.