You need to sign in to do that
Don't have an account?
SFDX: Authorize an Org failed to run
Hi All,
I am tring to authorize an org on visual studio code but when I am trying authorize it, I am getting the below error.
SFDX: Authorize an Org failed to run
Try this:
Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
19:31:13.241 sfdx force:auth:web:login --setalias VSCodePlayground --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1
I have Killed the Process on port 1717 and tried it again then I am not getting any error but it is running for infinite time.
Please help.
Thanks,
Parteek
I am tring to authorize an org on visual studio code but when I am trying authorize it, I am getting the below error.
SFDX: Authorize an Org failed to run
Try this:
Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file.
19:31:13.241 sfdx force:auth:web:login --setalias VSCodePlayground --instanceurl https://login.salesforce.com --setdefaultusername ended with exit code 1
I have Killed the Process on port 1717 and tried it again then I am not getting any error but it is running for infinite time.
Please help.
Thanks,
Parteek
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
Yes, there is already one process in running so you have to first kill that process after you can authorize your Org.
You should follow this command in your VS code terminal:
Example: taskkill /PID 13872 /F
For kill VScode process
netstat -ano | findstr :8084
You can also install Task Kill tool from VS code marketplace
- Open up the prompt (F1 \ Ctrl+Shift+P \ CMD+Shift+P) and select: "Task Kill: Kill an active network
task (by port number)" or simply hit Ctrl + Del (numpad_decimal).
- Type in the port number of the process you want to kill.
- Hit enter.
You can follow this link for more help:
https://marketplace.visualstudio.com/items?itemName=Shynet.vscode-taskkill
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Hi Anas/Ajay,
I have tried this, but still facing the same issue.
Thanks,
Parteek
same issue to me, even i tried all https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_troubleshoot_cancel_auth.htm
then not worked for me, so i reinstalled the vsc and installed the plugin and its worked perfectly. but not sure this as the solution, but worth to retry to install and check it.
Thanks
netstat and taskkill commands helped me sort this issue out. Thanks a lot!
Swapna
1.Press Ctrl+Alt+Delete, then click Task Manager.
2.Select the Process tab.
3.Find the process named Node.
4.Select the process that you want to end, and then click End Process.
Hope this will work.
I have tried killing the process named node. Now when i tried to authorise the dev hub then this command runs for uncertain time and doesnt open up browser window asking for allow or deny options.
Any help will be appreciated.
Parteek,
Are you able to get conquer this challenge? if yes then please give hints.
Regards
Vidyut
is your problem resolved, I am facing the same issue. It is a endless process, after clicking that Node process
I am having an issue and I have set the path C:\Windows\System32 in our environment variables and I had set the environment variable HTTP_PROXY in the Environment Variables section of my windows System Properties to
http://webproxyaddress:8080/. The issue is still not resolved. I keep getting the same error as below.
Starting SFDX: Authorize an Org
11:35:26.773 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
{ Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'start',
'""',
'/b',
'https://login.salesforce.com//services/oauth2/authorize?response_type=code^&client_id=PlatformCLI^&redirect_uri=http%3A%2F%2Flocalhost%3A1717%2FOauthRedirect^&state=46c1108c2830^&prompt=login^&scope=refresh_token%20api%20web^&code_challenge=KaSmJ2QYMtuO06KLUUM1B_3c5FZaUDADD6ugrRaF0h4' ] }
{ Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'start',
'""',
'/b',
'https://login.salesforce.com//services/oauth2/authorize?response_type=code^&client_id=PlatformCLI^&redirect_uri=http%3A%2F%2Flocalhost%3A1717%2FOauthRedirect^&state=46c1108c2830^&prompt=login^&scope=refresh_token%20api%20web^&code_challenge=KaSmJ2QYMtuO06KLUUM1B_3c5FZaUDADD6ugrRaF0h4' ] }
{ Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'start',
'""',
'/b',
'https://login.salesforce.com//services/oauth2/authorize?response_type=code^&client_id=PlatformCLI^&redirect_uri=http%3A%2F%2Flocalhost%3A1717%2FOauthRedirect^&state=46c1108c2830^&prompt=login^&scope=refresh_token%20api%20web^&code_challenge=KaSmJ2QYMtuO06KLUUM1B_3c5FZaUDADD6ugrRaF0h4' ] }
{ Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs:
[ '/c',
'start',
'""',
'/b',
'https://login.salesforce.com//services/oauth2/authorize?response_type=code^&client_id=PlatformCLI^&redirect_uri=http%3A%2F%2Flocalhost%3A1717%2FOauthRedirect^&state=46c1108c2830^&prompt=login^&scope=refresh_token%20api%20web^&code_challenge=KaSmJ2QYMtuO06KLUUM1B_3c5FZaUDADD6ugrRaF0h4' ] }
I have been struggling from few days on this issue.
Any help is appreciated.
Thanks in advance.
If you are trying to Authorizing an Org, but you are getting an error OR if it keeps loading.
Resolve it in 2 Steps:
1. Open Task Manager -> Details -> Delete the process with name 'Node.exe'
2. Set Microsoft Edge as your default browser.
#HappyToHelp
Thanks,
Hrushikesh
hrushikesh vaze...,node.exe is coming while trying to Authorizing an Org if i kill the node.exe file . Authorize an Org failing if am doing same thing also plz help me on this
sfdx force:auth:web:login --setalias ml_09_11_2020 --instanceurl https://login.salesforce.com --setdefaultusername
ended with exit code 1
sfdx force:auth:web:login --setalias ml_09_11_2020 --instanceurl https://login.salesforce.com --setdefaultusername
ERROR running force:auth:web:login: spawn UNKNOWN
if you are getting ended with exit code1, it means there is a lightning component in your dev org which exists with teh same name thats why you get the errror. you can delete it from your source org and then re depoy it. It work work.
I had authorize an org working and then somehow it stopped working. Though it did complain about the port, after turning it off and killing the PID,
I still had the port issue, turned out it was not the fix.
It worked at home but not at work (which it used to).
Realized our wonderful IT department had put an network protection tool that sniff out and certain blocks URL logins from your PC. Worked out IT put in force point and it stopped working. Had to get them to allow traffic for all saleforce site. Find out first if your IT network people has done something, especially for very large organisation.
Also I notice another thing if I tried to "Retrieve Source org" the code and config, if the data is saved to a network drive it just hangs there trying to retrieve the data. Create your "Project with Manifest" in your local drive and you will have better luck with "Retrieve Source org". IT network engineers sure can cause alot of issues without realising it.
if you've a admin profile, on your org, go to settings>users>click in your user and roll down.
In :
Connected Apps do OAuth, revoke all Salesforce CLI apps with count equals 0.
Try again on VSCode and if it work give a like here.