{"record":{"id":"56bb7a62434aab8d","repo":"can1357/oh-my-pi","slug":"steps-manager-update-did-not-produce-a-working","errorCode":null,"errorMessage":"${steps.manager} update did not produce a working launcher and binary repair failed: ${err}","messagePattern":"(.+?) update did not produce a working launcher and binary repair failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/coding-agent/src/cli/update-cli.ts","lineNumber":1644,"sourceCode":"\t\tinstallError === undefined && result.actual !== undefined && compareVersions(result.actual, release.version) < 0;\n\tconst launcherNeedsRepair = !result.ok && (launcherIsBroken || launcherIsOlder);\n\tif (!launcherNeedsRepair) {\n\t\tif (installError) throw installError;\n\t\tprintVerificationResult(result, release.version);\n\t\treturn;\n\t}\n\tif (!launcherPath) {\n\t\tthrow installError ?? new Error(formatVerificationFailure(result, release.version));\n\t}\n\tconsole.log(\n\t\tchalk.yellow(\n\t\t\t`\\n${steps.manager} did not install a working ${APP_NAME} ${release.version} launcher (${formatVerificationFailure(result, release.version)}); installing the standalone binary at ${launcherPath}.`,\n\t\t),\n\t);\n\ttry {\n\t\tawait steps.repair(launcherPath);\n\t} catch (err) {\n\t\tthrow new Error(`${steps.manager} update did not produce a working launcher and binary repair failed: ${err}`, {\n\t\t\tcause: installError ?? err,\n\t\t});\n\t}\n\tconsole.log(\n\t\tchalk.yellow(\n\t\t\t`This install is no longer managed by ${steps.manager}. Removing the old global package may delete this launcher; if it does, reinstall with: ${installerHint()}`,\n\t\t),\n\t);\n}\n\nasync function updateViaHomebrew(expectedVersion: string, force: boolean): Promise<void> {\n\tconsole.log(chalk.dim(\"Updating Homebrew formulae...\"));\n\tconst update = await $`brew update`.nothrow();\n\tif (update.exitCode !== 0) {\n\t\tthrow new Error(`brew update failed with exit code ${update.exitCode}`);\n\t}\n\n\tconsole.log(chalk.dim(\"Updating via Homebrew...\"));","sourceCodeStart":1626,"sourceCodeEnd":1662,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/coding-agent/src/cli/update-cli.ts#L1626-L1662","documentation":"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).","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Read the `cause` of this error — it holds the original verification or repair failure","Check network access to the release/binary download host","Run the standalone installer manually to replace the launcher","Remove the stale global package and reinstall from scratch (`bun install -g`/`npm install -g` the new package name)","Verify the launcher on PATH actually points to the manager's bin dir (`which <app>`)"],"exampleFix":"// diagnose with cause\ntry {\n\tawait updateSelf();\n} catch (err) {\n\tconsole.error(err.message, err.cause); // cause holds installError/repair err\n}\n// or skip the manager and install the standalone binary directly","handlingStrategy":"fallback","validationCode":"// precondition: manager install + network to binary host\nconst dl = await fetch(BINARY_RELEASE_URL, { method: \"HEAD\" });\nif (!dl.ok) throw new Error(\"binary repair download unavailable; fix network first\");","typeGuard":"function hasRepairTarget(steps: ManagerUpdateSteps): steps is ManagerUpdateSteps & { repair: (p: string) => Promise<void> } {\n\treturn typeof steps.repair === \"function\";\n}","tryCatchPattern":"try {\n\tawait updateViaManager(steps, release);\n} catch (err) {\n\tconst root = err.cause ?? err; // original install/verification error\n\tlogger.error(\"manager update failed\", { message: err.message, cause: String(root) });\n\t// fall back to standalone installer\n}","preventionTips":["Ensure the release download host is reachable before starting manager updates","Keep the manager-installed launcher in a standard bin dir so verification passes","After package renames, reinstall fresh instead of updating in place"],"tags":["self-update","install","launcher","verification","fallback"],"backgroundTag":"update-verification-failed","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}