forcedotcom / cli

Salesforce CLI
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/
BSD 3-Clause "New" or "Revised" License
474 stars 77 forks source link

issue running sf source push in our pipeline #2920

Closed GMlynda closed 3 weeks ago

GMlynda commented 3 weeks ago

Note Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

We have a CI/CD pipeline in GitLab and everytime we get to near the end of the run on pushing our source control to the scratch org we're getting the following error: Error (1): 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: SHA check failed! Expected 26ac8de745ea874e3dcccd569aab8bdb7508a2d4, computed f75b07721a53832b21ed837c7589cb71b3a784c8

Steps To Reproduce

IMPORTANT Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue. We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue. We merge our branch, it runs a quality check - that passes, then it runs test and it fails with the error above (below pasting the full log from that job - warning it's log but I couldn't figure out how to get it as a file to just attach it) Can't share the repo because it's a private repo for a company and I don't have permission to do so.

Expected result

Actual result

System Information

PASTE_VERSION_OUTPUT_HERE

Additional information

Couldn't add whole thing because it said it was too long:

$ sfdx force:source:push --targetusername $SCRATCH_ORG_ALIAS (node:2008) Warning: Deprecated environment variable: SFDX_USE_GENERIC_UNIX_KEYCHAIN. Please use SF_USE_GENERIC_UNIX_KEYCHAIN instead. (Use node --trace-warnings ... to show where the warning was created) (node:2008) Warning: Deprecated environment variable: SFDX_AUTOUPDATE_DISABLE. Please use SF_AUTOUPDATE_DISABLE instead. (node:2008) Warning: Deprecated environment variable: SFDX_DOMAIN_RETRY. Please use SF_DOMAIN_RETRY instead. (node:2008) Warning: Deprecated environment variable: SFDX_LOG_LEVEL. Please use SF_LOG_LEVEL instead. (node:2008) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. Warning: We plan to deprecate this command in the future. Try using the "project deploy start" command instead. Warning: The "--targetusername" flag has been deprecated. Use "--target-org | -o" instead. Pushing v56.0 metadata to test-evyo3eoaq5nx@example.com using the v60.0 SOAP API. DEPLOY PROGRESS | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0/531 Components DEPLOY PROGRESS | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 1/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 25/531 Components DEPLOY PROGRESS | ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 50/531 Components DEPLOY PROGRESS | ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 50/531 Components DEPLOY PROGRESS | ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 50/531 Components DEPLOY PROGRESS | ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 50/531 Components DEPLOY PROGRESS | ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 50/531 Components DEPLOY PROGRESS | ████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 50/531 Components DEPLOY PROGRESS | ████████████████████████░░░░░░░░░░░░░░░░ | 319/531 Components DEPLOY PROGRESS | ████████████████████████░░░░░░░░░░░░░░░░ | 319/531 Components DEPLOY PROGRESS | ████████████████████████████░░░░░░░░░░░░ | 373/531 Components DEPLOY PROGRESS | ██████████████████████████████████░░░░░░ | 453/531 Components DEPLOY PROGRESS | ██████████████████████████████████░░░░░░ | 453/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 527/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components DEPLOY PROGRESS | ████████████████████████████████████████ | 531/531 Components Updating source tracking... Updating source tracking... ⣾ Updating source tracking... ⣽ Updating source tracking... ⣻ Updating source tracking... ⢿ Updating source tracking... ⡿ Updating source tracking... ⣟ Error (1): 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: SHA check failed! Expected 26ac8de745ea874e3dcccd569aab8bdb7508a2d4, computed f75b07721a53832b21ed837c7589cb71b3a784c8 Updating source tracking... done Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit code 1

github-actions[bot] commented 3 weeks ago

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[bot] commented 3 weeks ago

Hello @GMlynda :wave: It looks like you didn't include the full Salesforce CLI version information in your issue. Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

Thank you!

GMlynda commented 3 weeks ago

package runs this, not really sure how to get it updated: $ npm install -g sfdx-cli npm warn deprecated sfdx-cli@7.209.6: sfdx-cli is deprecated, and no updates are planned. Use @salesforce/cli instead. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm added 956 packages in 23s

k-capehart commented 3 weeks ago

@GMlynda The deprecation warning gives a link on how to update: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_move_to_sf_v2.htm

You'll probably want to use the supported command sf project deploy start once you move over to the updated cli.

If you're using this in CI, I actually have a post (self promotion, sorry!) that shows a very basic example of getting this working. I'm sure its similar in GitLab pipelines. https://www.kylecapehart.com/posts/github-actions/

shetzel commented 3 weeks ago

@k-capehart is correct. sfdx-cli@7.209.6 is very old and the bug you mention is fixed in the latest CLI versions. Please follow those instructions to update to the latest. If you continue to see the issue after updating reopen this or post a new issue.