If you are reading this blog post, I assume you must be having similar issue which I have faced when trying to authorize a saleforce org from VS Studio code to change orgs.
Why I am getting above error ?
In your root folder, where we have a .sfdx/ folder, there might be a json file which has a zero byte file. You might be wondering how to detect a zero byte file in .sfdx/ folder if you have more than 100 files. Please execute below command in bash terminal
$ find . -type f -empty
Once you execute above command, please remove files which has been detected as zero byte.
$ rm -rf <NAME OF YOUR FILE>
Now SFDX behind the scenes is happy and feel free to try to reauthorize or change orgs. You should be good
Top comments (0)