Not sure what's going on here but I'm following the following trailhead and trying to authorize my dev org for use with vs code:
When I run the command:
sfdx force:auth:web:login --setalias vsCodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
The browser opens to the login page then after I login i get the error:
This site can’t provide a secure connection
localhost sent an invalid response.
It redirects to https://localhost:1717/OauthRedirect?code={{code}}
I read many posts where the issue seems to be a network or firewall issue or another process already listening on that port. I verify that there's nothing listening on port 1717
before i run the sfdx command and when I run the command i'm not getting a refused
error or anything in fact after I run the command in a separate window i run:
netstat -ano | findstr 1717
and can verify that the process listening on that port is sfdx
. For good measure i tried to use a different port as others suggested by specifying oauthLocalPort
in the sfdx-project.json file. When I do this the redirect still goes to port 1717
at which point I do get a connection refused, which I would expect as no one is listening there now, I change the port on the URL to the one i specified and i'm back to square 1 which is the error:
localhost sent an invalid response.
If anyone can shed anymore light on this it would be appreciated.