{"record":{"id":"435ba70634d5efcb","repo":"affaan-m/ECC","slug":"error-message-install-state-checkpoint-also-fai","errorCode":null,"errorMessage":"${error.message} Install-state checkpoint also failed: ${checkpointError.message}","messagePattern":"(.+?) Install-state checkpoint also failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install/apply.js","lineNumber":469,"sourceCode":"    }\n\n    finalState = stateWithContentDigests(migration.finalState, appliedPlan);\n    if (typeof beforeInstallStateWrite === 'function') {\n      beforeInstallStateWrite({ plan: appliedPlan, state: finalState });\n    }\n    persistInstallState(plan.installStatePath, finalState);\n  } catch (error) {\n    if (migration.requiresBridgeState) {\n      try {\n        // The bridge was committed before any writes. Refresh it with hashes of\n        // files that now exist so uninstall can remove only bytes this attempt\n        // actually installed while preserving user changes.\n        persistInstallState(\n          plan.installStatePath,\n          stateWithContentDigests(migration.bridgeState, appliedPlan)\n        );\n      } catch (checkpointError) {\n        throw new Error(\n          `${error.message} Install-state checkpoint also failed: ${checkpointError.message}`,\n          { cause: error }\n        );\n      }\n    }\n    throw error;\n  }\n  let antigravityMigrationWarnings = [];\n  try {\n    const antigravityMigration = cleanupLegacyAntigravityInstall(appliedPlan);\n    if (antigravityMigration.detected && !antigravityMigration.complete) {\n      antigravityMigrationWarnings = [\n        'Legacy Antigravity migration is incomplete. ECC preserved modified, unverifiable, or unmanaged content under .agent; review and move anything you want to keep, then rerun the Antigravity install.',\n        ...(Array.isArray(antigravityMigration.warnings) ? antigravityMigration.warnings : []),\n      ];\n    }\n  } catch (error) {\n    antigravityMigrationWarnings = [","sourceCodeStart":451,"sourceCodeEnd":487,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/scripts/lib/install/apply.js#L451-L487","documentation":"Compound failure during applyInstallPlan: the install itself failed, and the emergency attempt to refresh the bridge install-state also failed; the error chains both messages so neither failure is masked.","triggerScenarios":"Thrown at scripts/lib/install/apply.js:469 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the primary error reported at the start of the message first.","Then repair the install-state: restore it from backup or re-run the installer to rebuild state.","Check disk space and permissions if the checkpoint write failed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}