When clicking the "Change Default Org" button in the VS Code status bar, rather than seeing a list of the orgs I was authorised against, I was seeing an error:

Unexpected end of JSON input
  • You can create a brand new SFDX project - this should resolve the issue you have. Commented Oct 13, 2023 at 1:24

2 Answers 2


When checking the JSON files for the authorised orgs (on MacOS, this is in the ~/.sfdx directory), I noticed one of them was zero bytes. When that was deleted, everything was back working as normal.

  • I didn't notice that you are pointing at /Users/your_user_name/.sfdx folder in macOS. After I deleted it my problem was fixed. Again it is not .sfdx folder in you project but in your User's folder in macOS. Commented Jul 3 at 15:37

I was able to resolve this issue in the sf folder, finding the maxRevision.json file and deleting it.

I then attempted to deploy again and it solved my issue, as well as created a new maxRevision.json folder as welll.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .