affaan-m/ECC · error
Unsupported uninstall operation kind
Error message
Unsupported uninstall operation kind: ${operation.kind} What it means
Final fallback in the uninstall operation executor: thrown when operation.kind matches none of the supported uninstall kinds (copy-file, merge-json, remove, etc.). The uninstaller cannot safely process the unknown operation.
Solutions
- Upgrade the installer/uninstaller to the version that wrote the state
- Inspect and fix or drop the unknown operation entries in the state record
- Delete the stale install-state and manually clean up remaining managed files
Example fix
// before uninstallFromRecord(record); // unknown kind 'template-render' // after await updateToInstallerVersion(record.installerVersion); uninstallFromRecord(record);
Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED = ['copy-file','merge-json','remove'];
if (record.state?.operations.some(op => !SUPPORTED.includes(op.kind))) throw new Error('state contains unsupported uninstall kinds'); Type guard
const uninstallSupported = (kind) => ['copy-file','merge-json','remove'].includes(kind);
Try / catch
try { uninstallFromRecord(record); } catch (e) { if (String(e.message).startsWith('Unsupported uninstall operation kind')) { await upgradeAndUninstall(record); } else throw e; } Prevention
- Match uninstaller version to installer version
- Inspect state operations before uninstalling
- Clean up manually if state is from an unknown version
When it happens
Trigger: Install-state record contains an operation kind unknown to the running uninstaller (version skew), or a corrupted/invalid operation entry with an unrecognized kind.
Common situations: Downgrading the plugin then uninstalling; state written by a newer installer; manually edited state JSON with typo'd kind values.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Missing merge payload for uninstall
- Unsupported repair operation kind
- A normalized install request is required
- An unqualified or incompatible Nasiko executable or receipt…
- cannot reset hunks for untracked files
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/a10af4a44d77e701.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/lib/install-lifecycle.js:1098
};
}
const previousJson = getOperationPreviousJson(operation);
if (previousJson !== undefined) {
writeContainedFile(operation.destinationPath, formatJson(previousJson), trustedRoot, 'uninstall');
return {
removedPaths: [],
cleanupTargets: []
};
}
return {
removedPaths: [],
cleanupTargets: []
};
}
throw new Error(`Unsupported uninstall operation kind: ${operation.kind}`);
}
function inspectManagedOperation(repoRoot, trustedRoot, operation, linkIndex = null, target = null) {
const destinationPath = operation.destinationPath;
if (!destinationPath) {
return {
status: 'invalid-destination',
operation
};
}
let managedDestination;
try {
managedDestination = getManagedDestination(
destinationPath,
trustedRoot,
'inspect managed operation',
{ allowFinalSymlink: operation.kind === 'remove' }View on GitHub (pinned to 8321021c54)