google-gemini/gemini-cli · error · Error
Extension ${extension.name} cannot be updated. ${getErrorMes
Error message
Extension ${extension.name} cannot be updated. ${getErrorMessage(e)}. To fix this, reinstall the extension. What it means
Catch-all around verifyExtensionIntegrity in checkForExtensionUpdate. Any throw from integrity verification (hash mismatch, missing files, metadata inconsistency) is wrapped with the extension name and the underlying message, plus a directive to reinstall.
Source
Thrown at packages/cli/src/config/extensions/update.ts:70
`Extension ${extension.name} cannot be updated, type is unknown.`,
);
}
try {
const status = await extensionManager.verifyExtensionIntegrity(
extension.name,
installMetadata,
);
if (status === IntegrityDataStatus.INVALID) {
throw new Error('Extension integrity cannot be verified');
}
} catch (e) {
dispatchExtensionStateUpdate({
type: 'SET_STATE',
payload: { name: extension.name, state: ExtensionUpdateState.ERROR },
});
throw new Error(
`Extension ${extension.name} cannot be updated. ${getErrorMessage(e)}. To fix this, reinstall the extension.`,
);
}
if (installMetadata?.type === 'link') {
dispatchExtensionStateUpdate({
type: 'SET_STATE',
payload: { name: extension.name, state: ExtensionUpdateState.UP_TO_DATE },
});
throw new Error(`Extension is linked so does not need to be updated`);
}
if (extension.migratedTo) {
const migratedState = await checkForExtensionUpdate(
{
...extension,
installMetadata: { ...installMetadata, source: extension.migratedTo },
migratedTo: undefined,View on GitHub (pinned to 5024443c72)
Solutions
- Reinstall the extension to restore a consistent file set and integrity record.
- If reinstall is undesirable, inspect error.cause / the verifier output to identify and restore the specific changed file.
- Lock the extension directory against manual edits to prevent recurrence.
Example fix
// before
try { await verifyExtensionIntegrity(...); } catch (e) { throw new Error('reinstall'); }
// after
try { await verifyExtensionIntegrity(...); }
catch (e) {
logger.warn('integrity failed for %s: %s', extension.name, e);
await reinstallExtension(extension.name);
} Defensive patterns
Strategy: try-catch
Try / catch
try { await checkForExtensionUpdate(ext, mgr); } catch (e) { if (/reinstall the extension/.test(String(e))) { await reinstallExtension(ext.name); } else throw e; } Prevention
- Avoid manual edits inside installed extension directories.
- Treat an interrupted update as corrupting; reinstall before retrying.
When it happens
Trigger: verifyExtensionIntegrity throws — typically because files referenced by the integrity record are missing or their hashes no longer match (post-update partial state, manual edits, disk corruption).
Common situations: A previous update was interrupted leaving half-written files; the user edited files inside the extension directory; antivirus/quarantine removed a file; cross-filesystem move changed permissions.
Related errors
- Updated extension not found after installation, got error:\n
- Failed to clone Git repository from ${installMetadata.source
- Extension ${extension.name} cannot be updated, type is unkno
- Extension is linked so does not need to be updated
- Invalid scope: ${argv.scope}. Please use one of ${Object.val
AI-assisted analysis of google-gemini/gemini-cli@5024443c72 (2026-08-12).
Data as JSON: /api/errors/e8a43cc3e9adab89.
Report an issue: GitHub.