Authorize Org failed in VS Code
The following solution worked for me
- Run command prompt ( > > - > )
- Run the command: -
- CTRL+F, to search for
- Note the number displayed in the in the same row where 1717 was found. In my case, it's
- Open Task Manager > Click on Details Tab > Sort by PID
- Locate the number from step 4 (in my case )
- Right-Click > End Task
- Go back to VS Code and run the command again " : "
Hope it helps :)
Solution straight from the Salesforce DX Developer guide. This worked right away for me on MacOs
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_troubleshoot_cancel_auth.htm
As the error says, port 1717 is not free. Try restarting your computer to see if the error persists. If so, you'll need to use a custom connected app, as outlined in Create a Connected App.