3

Created a New Project in vs code SFDX- Create Project

SFDX-Authorize Org

when i try to i get error

enter image description here Cannot read properties of undefined (reading 'setContentsFromObject')

This is most likely not an error with the Salesforce CLI. Please ensure all information is accurate and try again.

5
  • salesforce.stackexchange.com/questions/354018/… Does this answer your question? Sep 6, 2022 at 7:18
  • 1
    I tried to update using sfdx update stable-rc, still same error while authorizing
    – Naveen
    Sep 6, 2022 at 8:24
  • I'm getting this error while authorizing a specific playground. (Other playgrounds & dev orgs are getting authorized).
    – Naveen
    Sep 6, 2022 at 10:06
  • Tried to Authorize the Playground in another machine/Pc and it's getting Authorized. Why such error for my machine?
    – Naveen
    Sep 6, 2022 at 10:49
  • sfdx force:auth:device:login This doesn't work
    – Naveen
    Sep 6, 2022 at 15:53

3 Answers 3

3

Try going to the .sfdx folder under Users/[name]/.sfdx and delete everything in there. I had the same problem and this fixed it.

3
  • This also fixed it for me Sep 16, 2022 at 21:01
  • I tried this but it is not working... Can someone please help me? Oct 6, 2022 at 8:37
  • But I have 27 different orgs in there and the other 26 are fine. I've tried deleting all references to the failing org, but it still fails and everyone else still works. :-/
    – tggagne
    Jun 9 at 17:52
0

You can also just delete the file for your specific org, if you have multiple, instead of deleting everything. Thanks for the tip!

0

One of my students recently experienced this out of nowhere. We attempted the fixes listed here and I noticed that they could be elaborated a bit to help others since we got a little confused. Here are the steps we took to resolve it:

  1. Ran sfdx update stable-rc
  2. Closed VSCode
  3. Went to C:/Users/[name]/.sfdx and deleted all contents within (this could be a different drive depending on where you installed CLI)
  4. Restarted VSCode and attempted to connect to an org

This was successful in resolving the issue.

You must log in to answer this question.

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