affaan-m/ECC · error
Missing merge payload for uninstall
Error message
Missing merge payload for uninstall: ${operation.destinationPath} What it means
During uninstall of merge-type operations, the recorded JSON payload for the destination file is missing, so the tool cannot restore/merge the prior content. This indicates corrupted or truncated install metadata (the operation was recorded without its payload) rather than a user-input mistake; the faulting input is the uninstall operation's JSON payload.
Solutions
- Re-run the install to regenerate complete operation metadata, then uninstall again.
- Restore the destination file manually from backup if metadata cannot be repaired.
- Report the missing-payload path — it usually signals an install-lifecycle bug writing incomplete operation records.
Example fix
// before
uninstallFromRecord(record); // missing payload
// after
if (record.operations.some(op => op.kind === 'merge-json' && op.payload === undefined)) {
await reinstallThenUninstall();
} else {
uninstallFromRecord(record);
} Defensive patterns
Strategy: validation
Validate before calling
const bad = record.state.operations.filter(op => op.kind === 'merge-json' && op.payload === undefined);
if (bad.length) throw new Error('cannot uninstall: merge-json ops missing payload'); Type guard
function isUninstallable(op) { return op.kind !== 'merge-json' || op.payload !== undefined; } Try / catch
try { uninstallFromRecord(record); } catch (e) { if (String(e.message).startsWith('Missing merge payload for uninstall')) { await reinstallThenUninstall(); } else throw e; } Prevention
- Only uninstall with the same installer version that installed
- Verify state integrity before uninstall
- Let installs complete before uninstalling
When it happens
Trigger: Uninstalling with a recorded merge-json operation whose payload is undefined — incomplete install-state, schema drift, or the destination-merge shortcut path returned a cleanup object but the operation itself has no payload.
Common situations: Interrupted installs leaving partial state; hand-edited state files; uninstalling content installed by a different (older/newer) installer version.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Missing merge payload for repair
- Unsupported uninstall operation kind
- A normalized install request is required
- An unqualified or incompatible Nasiko executable or receipt…
- application request must be a JSON object
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/eae31c47c1a5393d.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/lib/install-lifecycle.js:1007
cleanupTargets: []
};
}
const existingDestination = getContainedExistingPath(
operation.destinationPath,
trustedRoot,
'uninstall'
);
if (!existingDestination) {
return {
removedPaths: [],
cleanupTargets: []
};
}
const payload = getOperationJsonPayload(operation);
if (payload === undefined) {
throw new Error(`Missing merge payload for uninstall: ${operation.destinationPath}`);
}
const currentValue = readJsonNoFollow(
getManagedDestination(existingDestination, trustedRoot, 'uninstall').managedPath
);
const nextValue = deepRemoveJsonSubset(currentValue, payload);
if (nextValue === JSON_REMOVE_SENTINEL) {
const removedPath = removeContainedPath(
operation.destinationPath,
trustedRoot,
'uninstall',
{ force: true }
);
return {
removedPaths: removedPath ? [operation.destinationPath] : [],
cleanupTargets: removedPath ? [removedPath] : []
};
}View on GitHub (pinned to 8321021c54)