3

I'm unable to authorize an existing scratch org (created with the SFDC DX CLI) in the Force.com IDE 2

I do the following:

  • On command line: display org detail using sfdx force:org:display -u <alias>
  • In Force.come IDE 2: right-click on project select Salesforce DX->Authorize a Scratch Org
  • Try to log in using custom domain

After entering user name and password, the browser says:

This page isn’t working. localhost didn’t send any data.

And the Force.com IDE pops a dialog saying:

Operation Failed This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - authentication failure username: <Not Specified>, clientId: <Not Specified>, loginUrl: https://login.salesforce.com, privateKey: <Not Specified>

I am able to log in to the org in my browser using the same credentials

  • 3
    Have you tried changing your settings so your loginUrl is your custom domain? It likely won't work otherwise. – sfdcfox Sep 26 '17 at 23:53
  • @sfdcfox yes that's it -- I had to manually update sfdx-project.json to set sfdcLoginUrl. I would have expected that to happen automatically when the scratch org was created. Also I'm not clear on how this works if you have multiple scratch orgs which would have different domains. But at least the basic process is working now... – Jelle van Geuns Sep 28 '17 at 6:59
  • If you create the scratch org from within the IDE or using sfdx command prompt within the current project, the correct randomly-generated domain will already be stored. The only time you have this problem is when someone else created a scratch org and you want to connect to it. It shouldn't normally be a problem for normal development cycles. – sfdcfox Sep 28 '17 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.