IDE cannot deploy to Sandbox orgs anymore, URL instance_url from authentication returns 301 redirect results

Issue #1669 resolved
Murat Berk created an issue

This is not an IDE issue anymore, our scripts has same issue with this too.

IDE can validate user/pass, but when it tries to do operations errors shows up since SF returns 301 redirects. This is domain based setup, i.e myDomain is set on the org.

Comments (15)

  1. Scott Wells repo owner

    What is the login URL of the connection being used? If it's a My Domain URL that includes an instance ID, e.g., naXY or csXY, remove the instance ID portion and try again. As you noticed, Salesforce started issuing HTTP redirects on those that aren't followed. The My Domain URL without the instance ID should work fine as well.

  2. Scott Wells repo owner

    Okay, I've hearing about this from a few others as well, and it doesn't seem that removing the instance ID resolves the issue.

    For those having this issue, is it only in orgs that have already been updated to Summer '20? This is the first weekend of the upgrade.

    Murat, you mentioned that this is also happening outside the IDE, correct? What other tools are you using that are also exhibiting this behavior?

    Also for anyone having this issue, I'd love to see the actual SOAP request/response pair that yields this issue. That can be captured in the idea.log by adding the following to Help>Diagnostic Tools>Debug Log Settings:

    #com.illuminatedcloud.client.ForceComApiClient!trace
    

    Note that this will capture ALL SOAP envelope information including usernames, passwords, and security tokens included in login API calls, so please do not post a raw idea.log here or send one via email. However, if you can find the specific request that is failing and extract just that, I'd love to see it. You can either include that in a comment here or email it to me at support@illuminatedcloud.com.

  3. Lisa Hemphill

    As discussed via email, I am also hitting this issue. I am using myDomain but removing the instance portion of the id in the login URL did not fix the problem for me.

    I am on the latest version of illuminated cloud (2.1.2.9) and intellij (2020.1.3).

  4. Scott Wells repo owner

    UPDATE: I've heard from a user that this is also affecting the CLI and the VS Code extensions. I have to assume that Salesforce is already cranking on a fix for it, but just in case I emailed the info I have so far to some folks there. I'll update this issue with anything new that I learn.

  5. Scott Wells repo owner

    With Lisa's assistance I've confirmed that this is in fact an HTTP 307/Temporary Redirect in response to an API call. As mentioned previously, I've only ever seen that in response to calls to My Domain URLs that include an instance ID, and removing the instance ID has always resolved the issue. That doesn't seem to be the case anymore, likely due to some change in Summer '20 (and even the 307 on URLs with instance IDs was a pretty recent behavioral change). As I stated previously, I have to assume that Salesforce is working madly on this already, but I'm going to convey this confirmation to them so they have everything we have. Once again, I'll post information I receive here as I get it.

  6. Scott Wells repo owner

    Sorry for the rapid-fire updates, but I noticed something in the log that Lisa provided. The redirect is actually to the My Domain URL with with the instance ID now, a total reversal of the previous behavior. For those of you experiencing this issue, you might try adding the instance URL to your login URL to see if that works. For native IC connections, you can just change it; for OAuth connections you're likely going to need to re-auth using that login URL. I'll be curious to hear whether that works or whether that just redirects you back to the login URL without the instance ID.

  7. Scott Wells repo owner

    Here's a pre-release build based on the current official release that will follow redirects. If you'd like to try it to see if it resolves this issue for you, do the following:

    1. Download the attached IlluminatedCloud2.zip archive. Do not extract it.
    2. Use Settings/Preferences>Plugins>Install plugin from disk (under the gear drop-down menu) to install this version.
    3. After the IDE restarts with the new version, try any of the operations that previously failed with this error.

    Please let me know your findings. If this resolves the issue I'll likely release a build with this change on Monday.

  8. Scott Wells repo owner

    I've just released 2.1.3.0 which includes the same change to follow redirects as the pre-release build that was previously attached here. I've received information from one user who installed it that it did resolve the core issue. Please let me know your experience after updating.

  9. Scott Wells repo owner

    That's a good question. Technically IC1 is end-of-life, but this is truly a blocker issue. I'll backport the changes to IC1 and issue an update later today. Barring any further blocker-level issues like this, that will likely be the last update to IC1, though.

  10. Scott Wells repo owner

    I just received the following update from Salesforce regarding this issue:

    There's unfortunately a bug in Spring '20 sandboxes with a My Domain name that don't have the "Stabilize the Hostname for My Domain URLs in Sandboxes" critical update activated. Activating that critical update is the workaround. We're working on getting a fix deployed this morning via W-7809460. The known-issue record exists at https://trailblazer.salesforce.com/issues_view?id=a1p4V000001SpyQQAS , though it should get amended to mention the API impact.

    I'm still going to update all versions of IC to handle redirects for this problem and also for any other unexpected future redirects, but it sounds like right now the problem can be mitigated by activating that the cited critical update, and hopefully later today Salesforce will have issued a patch that eliminates the issue altogether.

  11. Scott Wells repo owner

    Murat, I've just posted 1.8.5.7 for IC1 users with this same fix. Let me know if that doesn't get you going again.

  12. Murat Berk reporter

    Thanks the update worked, also thanks for the info on the known issue, I was looking for that yesterday.

  13. Log in to comment