Authorize Org failed in VS Code

  • I am new in learning lightning web component. I have installed VS Code, salesforce extension pack inside VS code, Salesforce CLI and set environment variable C:\Program Files\Salesforce CLI in my system.

    When i am trying to create a new project in VS Code, i am not able to authorize org. I am getting the below error.

    Starting SFDX: Authorize an Org
    
    23:45:43.364 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
    ERROR running force:auth:web:login:  Cannot start the OAuth redirect server on port PortInUseAction. 
    
    Try this: 
    Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
    23:45:46.30 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1
    

    Please help me out...Thanks

  • 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 :)

    on a Mac, i'm receiving this output when I enter netstat -aon in terminal etstat: illegal option -- o Usage: netstat [-AaLlnW] [-f address_family | -p protocol] netstat [-gilns] [-f address_family] netstat -i | -I interface [-w wait] [-abdgRtS] netstat -s [-s] [-f address_family | -p protocol] [-w wait] netstat -i | -I interface -s [-f address_family | -p protocol] netstat -m [-m] netstat -r [-Aaln] [-f address_family] netstat -rs [-s]

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM