2

When I try to authorize a new Dev Hub using the Force.com IDE 2 in Windows 10, I get a stacktrace after a couple of seconds:

com.salesforce.tools.ide.cli.api.SfdxApiException: Cannot start the oauth redirect server on port Error.
at com.salesforce.tools.ide.cli.api.SfdxCommand.getSfdxApiException(SfdxCommand.java:205)
at com.salesforce.tools.ide.cli.api.SfdxCommand.processErrorOutput(SfdxCommand.java:254)
at com.salesforce.tools.ide.cli.api.SfdxCommand.executeCommand(SfdxCommand.java:168)
at com.salesforce.tools.ide.cli.api.WebLoginCommand.doCall(WebLoginCommand.java:49)
at com.salesforce.tools.ide.cli.api.WebLoginCommand.doCall(WebLoginCommand.java:1)
at com.salesforce.tools.ide.cli.api.SfdxCommand.call(SfdxCommand.java:114)
at com.salesforce.tools.ide.ui.internal.handlers.HandlerWithProgressDialog.executeInBackground(HandlerWithProgressDialog.java:60)
at com.salesforce.tools.ide.ui.internal.handlers.HandlerWithProgressDialog.lambda$0(HandlerWithProgressDialog.java:82)
at com.salesforce.tools.ide.ui.internal.parts.JobProgressMonitorDialog.lambda$0(JobProgressMonitorDialog.java:62)
at org.eclipse.core.runtime.jobs.Job$1.run(Job.java:161)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

I have a suspicion: A timeout. I have noticed several times that the force.com cli is running very slow, to execute

sfdx force:org:list

it takes my system roughly 12 seconds. To execute a plain

sfdx

it takes my system roughly 2.5 seconds. More info:

  • cmd "node --version" outputs v6.10.0
  • My sfdx cli is the neweset version as of today

Did anyone face the same issue?

1
  • 1
    workaround: Kill the running node.js process when it happens. Then you have a new try. The running process seems to be blocking a port. Commented Jul 17, 2017 at 11:12

1 Answer 1

1

This troubleshooting tip from the Salesforce DX Developer Guide worked for me on MacOS.

It also has instructions for Windows (which I cannot test).

It's basically the same as @Mario Hammer's comment -- kill whatever other process is using the port the authorization needs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .