I have installed VS code and Salesforce CLI in my system.Now when I try to Authorize an Org using SFDC:Authorize an Org, It take me to the login page and also logs in and redirects to localhost:1717.

I get the below error

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

And the Url has this: http://localhost:1717/OauthRedirect?code=aPrxeoyeTpu7VD8TU5.MiH8R70GBrrinzlZHNm4qsQVi8SNWqfbyMGt33D.8taJ4_dX1cMu6JQ%3D%3D&state=e4365ba68ae7

I have tried to check if the port 1717 is free or used. Its free. Tried using personal network still same issue.

Please help me in getting this resolved.

Thanks, sfdcdev

  • Please try updating your force.com CLI with sfdx update as suggested by sfdcfox in this question.
    – Raul
    Jul 29 '19 at 8:46
  • I have installed updated CLI
    – sfdcdev
    Jul 29 '19 at 10:40

The Salesforce CLI use NodeJS to handle the authentication between client and Salesforce server

When you use a proxy or your network not transparent the https will occur the error

You can skip the error by set bellow variable in environment on your pc NODE_TLS_REJECT_UNAUTHORIZED = 0 Note: you must restart the CMD or VSC after set variables.

Read more: Salesforce CLI Environment Variables https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_cli_env_variables.htm

How to creating and Modifying Environment Variables on Windows https://docs.oracle.com/en/database/oracle/r-enterprise/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html

  • 1
    This isn't a great solution as it effectively allows man in the middle attacks for the heck of it. This shouldn't be used long-term.
    – Jessica
    Jul 5 '21 at 9:11

I just had a similar issue. Clearing the cache and cookies in my browser resolved the issue for me.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.