NullPointerException thrown by IntelliJ when the same org is authenticated twice in two projects

Issue #1555 resolved
Stephen Titley created an issue

Hey!

Discovered a bug yesterday when setting up some projects at my new job. Here is how I created the error:

  • Created ‘New Project from Existing Sources’
  • Used “sfdx force:auth:web:login -a aliasname -r http://test.salesforce.com” and connected org in the terminal panel
  • Created second ‘New Project from Existing Sources’
  • Used the same SFDX command above with same alias and URL.

Any time either of these projects attempted to use the connection to Salesforce, IntelliJ would then throw java.lang.SoapClient Null Pointer Exceptions in an alert window (or something to that effect). I suspect it is related to configuring the connection twice as the first connection was working perfectly until I set up the second project.

I fixed this by going to my .sfdx directory, deleting the related org connection .json file and then editing the alias.json file to remove the offending alias. I was then able to reconfigure the connection to Salesforce (just once this time) and everything was fixed.

Apologies I don’t have any stack trace for you as I already spent some time bashing my head against this yesterday. I’ve marked the issue as trivial as this will likely only affect a small group of people who try to auth the same org twice with the same alias.

Hope this helps!

Comments (5)

  1. Scott Wells repo owner

    Hi, Stephen. That exception is likely in your idea.log* file(s) which can be found using Help>Show Log in Explorer/Finder/Files. Do you mind either searching them for the error you saw or sending them to support@illuminatedcloud.com for review?

  2. Stephen Titley reporter

    Hi Scott, I’ve just sent an email to your support address with log file containing the errors. Hope this helps but please do let me know if I can further assist.

    Best regards,

    Stephen

  3. Scott Wells repo owner

    Thanks, Stephen. That's actually not an NPE in Illuminated Cloud. It's conveying a server-side NPE in Salesforce itself:

    java.lang.NullPointerException Error Id: 1417201423-52839 (-498280611)

    That's what's called a GACK which is an internal server-side error for which details aren't included. I'll convey this to Salesforce so they're aware of it.

  4. Log in to comment