Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFDC CLI: Invalid checksum in GitIndex buffer #2422

Closed
kurupira-br opened this issue Aug 23, 2023 · 12 comments
Closed

SFDC CLI: Invalid checksum in GitIndex buffer #2422

kurupira-br opened this issue Aug 23, 2023 · 12 comments
Labels
more information required Issue requires more information or a response from the customer

Comments

@kurupira-br
Copy link

kurupira-br commented Aug 23, 2023

Context:
VSCode: 1.81.1
Windows 11

using SFDC CLI:

╰─ff sf version --verbose --json
{
  "cliVersion": "@salesforce/cli/1.86.7-legacy.0",
  "architecture": "win32-x64",
  "nodeVersion": "node-v18.15.0",
  "osVersion": "Windows_NT 10.0.22621",
  "shell": "cmd.exe",
  "rootPath": "C:\\Users\\rfonseca\\AppData\\Local\\sfdx\\client\\7.209.6-8ba3197\\sf",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.1 (core)",
    "@oclif/plugin-commands 2.2.17 (core)",
    "@oclif/plugin-help 5.2.11 (core)",
    "@oclif/plugin-not-found 2.3.26 (core)",
    "@oclif/plugin-plugins 3.1.6 (core)",
    "@oclif/plugin-search 0.0.18 (core)",
    "@oclif/plugin-update 3.1.22 (core)",
    "@oclif/plugin-version 1.3.6 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.41 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "@salesforce/cli 1.86.7-legacy.0 (core)",
    "apex 2.3.4 (core)",
    "auth 2.8.4 (core)",
    "data 2.4.5 (core)",
    "deploy-retrieve 1.13.5 (core)",
    "functions 1.21.10 (user)",
    "info 2.6.30 (core)",
    "limits 2.3.23 (core)",
    "login 1.2.15 (core)",
    "org 2.9.19 (core)",
    "packaging 1.20.1 (user)",
    "schema 2.3.17 (core)",
    "settings 1.4.17 (core)",
    "sobject 0.1.32 (core)",
    "source 2.10.22 (core)",
    "telemetry 2.2.1 (core)",
    "templates 55.5.2 (core)",
    "trust 2.4.27 (core)",
    "user 2.3.20 (core)"
  ]
}

And Git:

╰─ff git --version
git version 2.39.2.windows.1
╭

When trying to push changes into SF environment (an Org), I get the following message:

╰─ff sf project deploy start --json
{
  "code": 1,
  "context": "DeployMetadata",
  "commandName": "DeployMetadata",
  "data": {
    "message": "Invalid checksum in GitIndex buffer: expected 61696c5f5f632f6669656c64732f54696d655f55 but saw c80b9b44ca4c35993b7cba33077345c0d6489480"
  },
  "message": "An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: Invalid checksum in GitIndex buffer: expected 61696c5f5f632f6669656c64732f54696
d655f55 but saw c80b9b44ca4c35993b7cba33077345c0d6489480",                                                                                                                                                                                                 "name": "InternalError",
  "status": 1,
  "stack": "InternalError: An internal error caused this command to fail. Please file a bug report at https://github.com/isomorphic-git/isomorphic-git/issues with this error message: Invalid checksum in GitIndex buffer: expected 61696c5f5f632f666965
6c64732f54696d655f55 but saw c80b9b44ca4c35993b7cba33077345c0d6489480\n    at GitIndex.fromBuffer (C:\\Users\\****\\AppData\\Local\\sfdx\\client\\7.209.6-8ba3197\\sf\\node_modules\\isomorphic-git\\index.cjs:682:13)",                               "exitCode": 1,
  "warnings": []
}

A ticket was created (now closed) also at Isomorphic-Git:
isomorphic-git/isomorphic-git#1806 (comment)

@kurupira-br kurupira-br added the investigating We're actively investigating this issue label Aug 23, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions
Copy link

Hello @kurupira-br 👋

It looks like you're using an outdated version of Salesforce CLI. sf (v1) is in "maintenance mode" as of July 12, 2023. We highly recommend you move from sf (v1) to sf (v2) ASAP.

Moving to sf (v2) is easy and takes just two commands. Find all the information here.

After you move to the latest version of sf (v2), run your command again and provide the output of sf version --verbose --json.

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Aug 23, 2023
@cristiand391
Copy link
Member

@kurupira-br have you tried latest sf as mentioned above?

@kurupira-br
Copy link
Author

there is something wrong with the update...
image

Anyway, I did the workaround mentioned on the previous ticket:

  • pushed my code into a PR;
  • deleted my branch;
  • pulled the branch from the PR.

Everything is normal now.

@cristiand391
Copy link
Member

@kurupira-br got it.
I think you'll need to uninstall sf v1 and download the v2 installer, see:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm

@vineet-goel-salesforce
Copy link

I have updated to v2 installer but now the problem is spinner keeps on running , I am trying to retrieve the files but spinner keeps on running

@kurupira-br
Copy link
Author

make sure you have unistalled all previous cli versions.

@vineet-goel-salesforce
Copy link

Can you please guide how to uninstall all the previous cli versions, or is there a way to check if any previous version is still installed on the system.

@sawpatel
Copy link

Here is the requsted output after upgrading to SF (V2):

sawan.patel@SP-MBP-REPO % sf version --verbose --json
{
"cliVersion": "@salesforce/cli/2.10.2",
"architecture": "darwin-x64",
"nodeVersion": "node-v18.18.0",
"osVersion": "Darwin 22.6.0",
"shell": "zsh",
"rootPath": "/usr/local/lib/node_modules/@salesforce/cli",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.8 (core)",
"@oclif/plugin-commands 2.2.25 (core)",
"@oclif/plugin-help 5.2.19 (core)",
"@oclif/plugin-not-found 2.4.1 (core)",
"@oclif/plugin-plugins 3.7.1 (core)",
"@oclif/plugin-search 0.0.22 (core)",
"@oclif/plugin-update 3.2.3 (core)",
"@oclif/plugin-version 1.3.10 (core)",
"@oclif/plugin-warn-if-update-available 2.1.0 (core)",
"@oclif/plugin-which 2.2.32 (core)",
"@salesforce/cli 2.10.2 (core)",
"apex 2.3.15 (core)",
"auth 2.8.17 (core)",
"data 2.5.9 (core)",
"deploy-retrieve 1.18.0 (core)",
"info 2.6.43 (core)",
"limits 2.3.34 (core)",
"login 1.2.31 (core)",
"marketplace 0.2.2 (core)",
"org 2.10.8 (core)",
"schema 2.3.26 (core)",
"settings 1.4.29 (core)",
"sobject 0.2.7 (core)",
"source 2.10.34 (core)",
"telemetry 2.3.3 (core)",
"templates 55.5.12 (core)",
"trust 2.6.13 (core)",
"user 2.3.32 (core)"
]
}

Command: sf project deploy start ... (or any sf project commands) throws this error:
Error (1): An internal error caused this command to fail. isomorphic-git error:
Invalid checksum in GitIndex buffer: expected 000000140000024289494aa49e26943eeb73e0c0 but saw 44deeaf8bccb09857f4fe317c9db4dd0a9a93e3f

@forcetrekker
Copy link

forcetrekker commented Nov 3, 2023

I noticed this generally occurs when my password in salesforce is expired.
Steps to follow to resolve this:

  1. Login to salesforce with username and password to check if password change is needed.
  2. If password change was needed, reauthorize org credentials in vscode.
  3. Restart vscode or even the computer. :)
  4. Delete .sfdx and .sf folders from root directory of sfdx project, then reconnect the sfdx project with salesforce org.

Update: Had same problem again, additional to above I had to also delete node_modules folder and reinstall with npm i, then it started working again.

@awesomeandrey
Copy link

I've purged sfdx cli and (re)installed sf v2 (according to https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm). But the issue is still present:

sfdx cli issue

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

6 participants