"Unexpected end of JSON input" error when a cached org definition file is bad #2066
Labels
bug
Issue or pull request that identifies or fixes a bug
configFile
problems related to sfdx-core/configFile
Summary
It seems to be a recurring problem that users of the CLI can end up with a bad org definition file in ~/.sfdx. And when that happens, the CLI is unable to list orgs. Instead it gives the message "Unexpected end of JSON input".
See, for example, https://salesforce.stackexchange.com/questions/391686/vs-code-unexpected-end-of-json-input-error-when-changing-the-default-org
My team and I hit this infrequently enough to have to Google the cause, and it's a show-stopper until you realise what happened.
Steps To Reproduce:
Expected result
A list of the orgs that actually work
Actual result
System Information
Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.)
zsh
If you are using
sfdx
sfdx version --verbose --json
Additional information
Feel free to attach a screenshot.
The text was updated successfully, but these errors were encountered: