VSCode SFDX: Authorize an Org fails with EACCES error
See original GitHub issueSummary
SFDX: Authorize an Org fails with EACCES error.
Steps To Reproduce:
- Open VS code with no project
- Issue command
SFDX: Create Project
- Name the project
VSCodeQuickstart
(for instance) - In file
project-scratch-def.json
changeorgName
toLearning VS Code
- Issue command
SFDX: Authorize an Org
- Accept default login URL
- Enter alias
VS Code Playground
(for instance)
Expected result
Browser window should open to authorize access.
Actual result
Browser does not open. Instead, the Output panel reads:
Starting SFDX: Authorize an Org
11:38:21.734 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
{ Error: listen EACCES: permission denied 127.0.0.1:1717
at Server.setupListenHandle [as _listen2] (net.js:1253:19)
at listenInCluster (net.js:1318:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1451:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
code: 'EACCES',
errno: 'EACCES',
syscall: 'listen',
address: '127.0.0.1',
port: 1717 }
{ Error: listen EACCES: permission denied 127.0.0.1:1717
at Server.setupListenHandle [as _listen2] (net.js:1253:19)
at listenInCluster (net.js:1318:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1451:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
code: 'EACCES',
errno: 'EACCES',
syscall: 'listen',
address: '127.0.0.1',
port: 1717 }
{ Error: listen EACCES: permission denied 127.0.0.1:1717
at Server.setupListenHandle [as _listen2] (net.js:1253:19)
at listenInCluster (net.js:1318:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1451:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
code: 'EACCES',
errno: 'EACCES',
syscall: 'listen',
address: '127.0.0.1',
port: 1717 }
{ Error: listen EACCES: permission denied 127.0.0.1:1717
at Server.setupListenHandle [as _listen2] (net.js:1253:19)
at listenInCluster (net.js:1318:12)
at GetAddrInfoReqWrap.doListen [as callback] (net.js:1451:7)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:61:10)
code: 'EACCES',
errno: 'EACCES',
syscall: 'listen',
address: '127.0.0.1',
port: 1717 }
11:38:23.839 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 0
Additional information
- Tried this over two different networks.
- First as normal user, then as admin.
VS Code Version: 1.33.1
SFDX CLI Version: sfdx-cli/7.5.0-e6ca93eee8 win32-x64 node-v10.15.3
OS and version: Windows 10 (Windows_NT x64 10.0.17763
)
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
SFDX: Authorize an org error: listen EACCES: permission ...
Administered Port Exclusions are the reason. In the Salesforce CLI log, you also see: error: listen EACCES: permission denied 127.0.0.1:1717.
Read more >Issue with SFDX: Authorize an Org in vscode
Hi All, I am trying to authorize an org using vscode. I am getting the following error. { Error: spawn cmd ENOENT at...
Read more >Authorize an org error: listen EACCES: permission denied ...
Authorizing an org either through command palette or with a command in terminal had never been a problem [Command is like this: sfdx...
Read more >SFDX Authorize an Org failed to run - Stack Overflow
After re-installing Salesforce CLI and running the command sfdx from the Terminal window, I am still getting this error: "/Users/eduardo/.local/ ...
Read more >Salesforce Tips - Resolve Org Authorization Error in VS Code
In this blog we will discuss how to resolve the Authorization error while executing SFDX command “Authorize an Org” in VS Code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is one final piece to the puzzle, and it definitely is a bug. The
oauthLocalPort
is ignored at callback, and it uses the1717
port.To reproduce:
oauthLocalPort
to anything working not1717
sfdx force:auth:web:login -d -a DevHub
http://localhost:
1717/OauthRedirect?code=aPrxrDqe....
This redirect should be to the
oauthLocalPort
set insfdx-project.json
The workaround is to replace the
1717
in the browser url with the alternate port.An alternative approach that seems to work is to restart in safe mode with networking enabled and add 1717 to your own range, and then restart back to normal.
netsh interface ip add excludedportrange protocol=tcp startport=1717 numberofports=1