If you encounter any errors or issues while using Salesforce DX, check out the troubleshooting tips below. If you still need help, post your issue in the Salesforce DX Developer Forum.

This document covers the following topics

  • Salesforce DX Command-Line Interface Errors
  • Common Issues with Authentication
  • Problems Creating or Pushing Scratch Orgs
  • Issues When Working with Source Code
  • Unexpected Behavior in Apex Tests Run from Dev Hub orgs

Salesforce DX Command-Line Interface Errors

If you get an error when running a Salesforce DX command, make sure that you’re using the latest version of the CLI. To update the CLI, run sfdx update from your terminal.

If you still get an error after updating the CLI, check the Salesforce DX help documentation for more information.

Common Issues with Authentication

If you encounter issues while authenticating your orgs (for example, if you’re prompted for a username and password that you don’t have), make sure that you’re using the correct login URL. The login URLs for Dev Hub orgs and non-Dev Hub orgs are different. To determine which login URL to use, see Authenticate Orgs.

If you’re still having problems authenticating your org, post your issue in the Salesforce DX Developer Forum.

Problems Creating or Pushing Scratch Orgs

If you encounter an error when creating a scratch org or pushing source to a scratch org, make sure that you’re using the latest version of the Salesforce DX CLI. To update the CLI, run sfdx update from your terminal.

If you still get an error after updating the CLI, check the Salesforce DX help documentation for more information.

Issues When Working with Source Code

If you encounter an issue while working with your source code (for example, if you can’t retrieve your source from your org), make sure that you have set up your project correctly. For information about setting up your project, see Set Up Your Project in Salesforce DX.

If you’re still having problems with your source code, post your issue in the Salesforce DX Developer Forum.

Unexpected Behavior in Apex Tests Run from Dev Hub orgs

If you see unexpected behavior when running Apex tests from a Dev Hub org (for example, if some of your tests are failing), make sure that you’re using the latest version of the Salesforce DX CLI. To update the CLI, run sfdx update from your terminal.

If you still see unexpected behavior after updating the CLI, check the Salesforce DX help documentation for more information.

If you still need help, post your issue in the Salesforce DX Developer Forum.

Common Issues with Authentication

If you encounter issues while authenticating your orgs (for example, if you’re prompted for a username and password that you don’t have), make sure that you’re using the correct login URL. The login URLs for Dev Hub orgs and non-Dev Hub orgs are different. To determine which login URL to use, see Authenticate Orgs.

If you’re still having problems authenticating your org, post your issue in the Salesforce DX Developer Forum.

Problems Creating or Pushing Scratch Orgs

If you encounter an error when creating a scratch org or pushing source to a scratch org, make sure that you’re using the latest version of the Salesforce DX CLI. To update the CLI, run sfdx update from your terminal.

If you still get an error after updating the CLI, check the Salesforce DX help documentation for more information.

Issues When Working with Source Code

If you encounter an issue while working with your source code (for example, if you can’t retrieve your source from your org), make sure that you have set up your project correctly. For information about setting up your project, see Set up Your Project in Salesforce DX.

If you’re still having problems with your source code, post your issue in the Salesforce DX Developer Forum.

Unexpected Behavior in Apex Tests Run from Dev Hub orgs

If you see unexpected behavior when running Apex tests from a Dev Hub org (for example, if some of your tests are failing), make sure that you’re using the latest version of the Salesforce DX CLI. To update the CLI, run sfdx update from your terminal.

If you still see unexpected behavior after updating the CLI, check the Salesforce DX help documentation for more information.

If you still need help, post your issue in the Salesforce DX Developer Forum.

Conclusion

If you’re still having problems authenticating your org, post your issue in the Salesforce DX Developer Forum.