cli
cli copied to clipboard
Error: Metadata API request failed: isomorphic-git error: Index file is empty (.git/index)
Summary
We have a node script using which we are trying to kind of "take a snapshot" of the org. For this,
- We create 8 child processes.
- All these 8 child processes execute in parallel.
- Each process retrieves at max 5000 members of a particular member type.
- Each process uses the command
sf project retrieve start --target-org <sessionId> --manifest <path-to-package-xml> --wait 60 --json
to retrieve a particular member type. - If a process completes a retrieval, it goes on to pick the next metadata type and continues its retrieval
What we observe is: during the retrieval process, some retrievals fail with the error: Metadata API request failed: An internal error caused this command to fail. isomorphic-git error:Index file is empty (.git/index). As far as we have observed, this is happening only for sandboxes and not for regular developer edition orgs.
Steps To Reproduce
In an sfdx-repo ( the size of the repo doesn't matter, I have been trying this on an empty repo ), try to retrieve multiple metadatas in parallel from a sandbox.
Expected result
The metadata retrieval should be successful
Actual result
The metadata retrieval fails with the error: Metadata API request failed: An internal error caused this command to fail. isomorphic-git error:I ndex file is empty (.git/index)
Additional information
System Information
Terminal: bash sf version --verbose --json gives the following response { "architecture": "linux-x64", "cliVersion": "@salesforce/cli/2.52.6", "nodeVersion": "node-v20.15.1", "osVersion": "Linux 4.4.0", "rootPath": "/usr/local/lib/node_modules/@salesforce/cli", "shell": "bash", "pluginVersions": [ "@oclif/plugin-autocomplete 3.1.9 (core)", "@oclif/plugin-commands 4.0.9 (core)", "@oclif/plugin-help 6.2.7 (core)", "@oclif/plugin-not-found 3.2.13 (core)", "@oclif/plugin-plugins 5.3.9 (core)", "@oclif/plugin-search 1.2.4 (core)", "@oclif/plugin-update 4.4.12 (core)", "@oclif/plugin-version 2.2.9 (core)", "@oclif/plugin-warn-if-update-available 3.1.10 (core)", "@oclif/plugin-which 3.2.9 (core)", "@salesforce/cli 2.52.6 (core)", "apex 3.3.2 (core)", "auth 3.6.38 (core)", "data 3.5.8 (core)", "deploy-retrieve 3.9.21 (core)", "info 3.3.21 (core)", "limits 3.3.20 (core)", "marketplace 1.2.19 (core)", "org 4.4.0 (core)", "packaging 2.7.4 (core)", "schema 3.3.21 (core)", "settings 2.3.9 (core)", "sobject 1.4.20 (core)", "source 3.5.7 (core)", "telemetry 3.6.3 (core)", "templates 56.3.6 (core)", "trust 3.7.15 (core)", "user 3.5.20 (core)" ] }
SF CLI Version: @salesforce/cli/2.52.6 linux-x64 node-v20.15.1