SoapFault: INVALID_SESSION_ID when describing metadata

Issue #2049 resolved
Teodora Raileanu created an issue

Whenever I try to create a new project, I can successfully validate the connection to salesforce. Still, when trying to describe or retrieve the metadata I get the following error:

Comments (9)

  1. Scott Wells repo owner

    Hi. What type of connection is being used? Native (where you enter your username/password/token directly into IC2)? OAuth? If the former, was MFA (multi-factor authentication) enabled for the connection user? If the latter, can you please verify that you have the latest version of the Salesforce CLI installed?

    Let's start with those questions and I imagine I'll have others when I have the answers to them.

  2. Teodora Raileanu reporter

    Hi Scott, thanks for your quick answer. I am using username/pswd & token directly into IC2.

  3. Scott Wells repo owner

    Okay. I have two recommendations. First, just in case there's some retention of an older session ID when this call is made--and I don't know why that would, but let's assume it could be for the moment--please restart the IDE process and see if the same issue holds. Assuming it does, it may be an instance of an issue I've seen perhaps 2-3 times over the past few years where the Salesforce API returns a session ID from a call to the login API that it then doesn't recognize on subsequent calls. I think that Salesforce said it may have something to do with session consistency across clustered servers, but it's been a very long time since the topic was discussed. What you might try in that case is switching from a native connection to an OAuth connection:

    https://bitbucket.org/RoseSilverSoftware/illuminatedcloud/wiki/User_Guide/Configuring_Connections#markdown-header-oauth-connections-to-existing-salesforce-orgs

    Note that while this requires the Salesforce CLI, it does not in any way require you to use any other aspect of Salesforce DX for your project. It just allows IC2 to delegate to the Salesforce CLI to create and maintain an OAuth access token to be used as its session ID.

    Please let me know if those suggestions don't help to resolve the issue for you, and I'll be curious to know which does provide resolution if so if you don't mind.

  4. Teodora Raileanu reporter

    I already uninstalled and reinstalled intellij and illuminated cloud a couple of times, didn’t make any difference. The actual login works fine, but immediately after success message I get the session id error. Also, I’ve tried retrieving with VS code and it works fine.

    I have tried to Authorize the org through Oauth connection, but that doesn’t seem to be available outside of SFDX, which I am not familiar with.

  5. Scott Wells repo owner

    Hi. Anything new to report on this? Were you able to get OAuth connections going and did they resolve the issue for you?

  6. Teodora Raileanu reporter

    Hi Scott, the issue was resolved after using an OAuth connection. Thanks for the support!

  7. Log in to comment