function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sandip ChakrabortySandip Chakraborty 

VS Code is not working to Authorize an Org

I have very painful experinece to authorize an Org. Most of the time it fails to authorize the Org and shows the below error. I restarted m/c , shutdown , kill the node.js process , re-install and install Vs code . But nothing works.
Any help is very much needed. 

Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
13:16:15.855 sfdx force:auth:web:login --setalias personal --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1

 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Sandip,

Greetings to you!

Please refer to the below links which might help you further with the above issue.

https://salesforce.stackexchange.com/questions/208158/authorizing-dev-hub-from-force-com-ide2-redirects-to-localhost-after-authorizing

https://salesforce.stackexchange.com/questions/249857/cannot-connect-a-salesforce-org-using-authorize-an-org-in-vs-code

https://salesforce.stackexchange.com/questions/251589/unable-to-authorize-salesforce-org-using-sfdx-trailhead

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Kewal Jaipuria 6Kewal Jaipuria 6
Hi Sandip,
The following solution worked for me:
  1. Run command prompt 𝐚𝐬 𝐚𝐝𝐦𝐢𝐧 (𝘚𝘵𝘢𝘳𝘵 > 𝘤𝘮𝘥 > 𝘙𝘪𝘨𝘩𝘵-𝘊𝘭𝘪𝘤𝘬 > 𝘙𝘶𝘯𝘈𝘴 𝘈𝘥𝘮𝘪𝘯)
  2. Run the command: 𝐧𝐞𝐭𝐬𝐭𝐚𝐭 -𝐚𝐨𝐧
  3. CTRL+F, to search for 𝟏𝟕𝟏𝟕
  4. Note the number displayed in the 𝐏𝐈𝐃 𝐜𝐨𝐥𝐮𝐦𝐧 in the same row where 1717 was found. In my case, it's 𝟒𝟔𝟒𝟖
  5. Open Task Manager > Click on Details Tab > Sort by PID
  6. Locate the number from step 4 (in my case 𝟒𝟔𝟒𝟖)
  7. Right-Click > End Task
  8. Go back to VS Code and run the command again "𝘚𝘵𝘢𝘳𝘵𝘪𝘯𝘨 𝘚𝘍𝘋𝘟: 𝘈𝘶𝘵𝘩𝘰𝘳𝘪𝘻𝘦 𝘢𝘯 𝘖𝘳𝘨"


Hope it helps :)