SHA mismatch error when sfdx update command is executed

1.5k Views Asked by At

Salesforce CLI is recently installed in my system and it is showing the following information on every command.

! sfdx-cli: update available from 6.55.1-be0b3dc4c4 to 7.22.0-de5c6ecff8

I am not able to create project for the same. I have also checked by setting the disable auto update as ture in the environment variables.

When I am running sfdx update, the update is failing with the following error

SHA mismatch: expected <alpha-numaric id> to be <different alpha-numaric id> 
3

There are 3 best solutions below

0
On

This appears to arise from time to time, and I got hit by this today. In my case there was no difference whether run in standard perms or as administrator.

In order to fix this, Salesforce product management suggested on github to do a full uninstall and reinstall of the CLI.

I was trying to avoid doing this so instead I did the following:

> sfdx plugins:uninstall salesforcedx
> sfdx update

That worked for me as an alternative to doing the full on uninstall/reinstall.

0
On

If on windows try running as an admin. That seemed to solve my problem (on Windows Server 12).

If you're on a Linux machine try running with sudo rights.

0
On

In Windows OS, sfdx update needs admin privilege. You should have run the command prompt as admin and then try for sfdx update. I just did that and was able to complete sfdx update.