paperclipai/paperclip · error · Error
failed service validation and was rolled back to , but the…
Error message
${payloadLabel} failed service validation and was rolled back to ${rolledBack.version}, but the rolled-back service also failed to restart. What it means
After a failed service validation the install was rolled back, but restarting the rolled-back version also failed; the aggregate error carries both the validation and restart causes.
Solutions
- Inspect service logs for both payloads, fix the underlying startup failure, and reinstall a known-good version.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cli/src/commands/update.ts:159 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/0314126c665aa35e.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/update.ts:159
async function defaultConfirm(message: string): Promise<boolean> {
if (!process.stdin.isTTY || !process.stdout.isTTY) return false;
const answer = await p.confirm({ message, initialValue: false });
return !p.isCancel(answer) && answer === true;
}
function emit(options: UpdateOptions, value: Record<string, unknown>, message: string): void { if (options.json) console.log(JSON.stringify(value, null, 2)); else console.log(message); }
async function rollbackAfterServiceValidationFailure(
paths: InstallStorePaths,
restartActiveService: (expectedVersion: string) => Promise<boolean>,
validationError: unknown,
payloadLabel: string,
): Promise<never> {
const rolledBack = await withInstallStoreLock(async () => rollbackManagedInstall(paths), paths);
try {
await restartActiveService(rolledBack.version);
} catch (restartError) {
throw new Error(
`${payloadLabel} failed service validation and was rolled back to ${rolledBack.version}, but the rolled-back service also failed to restart.`,
{ cause: new AggregateError([validationError, restartError]) },
);
}
throw new Error(`${payloadLabel} failed service validation and was rolled back to ${rolledBack.version}.`, { cause: validationError });
}
export async function updateCommand(options: UpdateOptions, overrides: Partial<Dependencies> = {}): Promise<void> {
const paths = overrides.paths ?? resolveInstallStorePaths();
const executablePath = overrides.executablePath ?? process.argv[1] ?? "";
const runCommand = overrides.runCommand ?? execFileAsync;
const mode = detectInstallMode(executablePath, paths);
const manifest = readInstallManifest(paths);
if (options.rollback) {
if (mode !== "managed") throw new Error("--rollback is only available for managed installs.");
if (options.dryRun) { emit(options, { mode, action: "rollback", dryRun: true, target: manifest?.previous[0]?.version ?? null }, `Would roll back to ${manifest?.previous[0]?.version ?? "the previous payload"}.`); return; }
const next = await withInstallStoreLock(async () => rollbackManagedInstall(paths), paths);
const restarted = await (overrides.restartActiveService ?? restartActiveManagedService)(next.version);View on GitHub (pinned to 01ad858492)