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.
Hello my fellow mortals,
I have decided to grace you all with the ansewer that has been givin to me from the all mighty allStack.
The solution is to put this in the command Promt (windows)
sfdx plugins:install @salesforce/plugin-auth@1.4.3
Hi,
Im facing same issue . Tried with changing default browser , unintalled and intalled and done SFDX update . But not worked for me.
Still facting the same issue.
Please do needful
Thanks in advance.
I faced the same issue I tried :
1) to kill all processes
2) Not able to find the Node process in my task manager processes.
3) Restarting vscode
4) Reinstalling SFDX CLI
Finally, the solution that worked for me is,
I used the below command :
sfdx plugins:install salesforcedx@48.22.11
I used the below command to debug an error:
enter below command in VS Code Terminal-
sfdx plugins:install salesforcedx@48.22.11
By using sfdx update, solved my issue
1. Download Salesforce cli and install.
2. Open Command prompt and write - sfdx update. It will update CLI to the latest version.
3. After this go to Vs code and try to authorize again. It should work now.
If it helps, like it. Have a nice day :)
@Pankaj Berwal (https://dfc-org-production.force.com/forums/ForumsProfile?communityId=09aF00000004HMG&userId=0052I00000CP5Da&showHeader=false),
C:\WINDOWS\system32>sfdx plugins:install salesforcedx@48.22.11
» Error: The salesforcedx plugin is deprecated.
» Installing it manually via 'sfdx plugins:install salesforcedx' is no longer supported and can result in duplicate
» commands and outdated plugins.
» See https://github.com/forcedotcom/cli/issues/1016 for more information about this change.
Can you help a brother out here?
open command prompt or terminal and run this command: sfdx update stable-rc
then ctrl+shift+p --> SFDX:Authorize an Org -->Project Default --> enter alias project name --> click enter
you will be redirected to your org in your browser.
1. Download Salesforce cli and install.
2. check if sfdx is intall properly or not ( open command prompt and write sfdx and enter )\
3: Set environment variable. Like ( path =C:\Program Files\sfdx\bin)
after that try to Authorize an Org. you will not get the error again.
I've faced a similar issue before. After killing the process on port 1717, try restarting Visual Studio Code and then attempt the authorization again. If it still runs indefinitely, consider restarting your machine. Hope this helps! https://authreviews.com/
Hey there Everyone, I faced the same issue after a sandbox refresh, none of the CLI command was working.
check on your terminal if you can see the version of your Salesforce CLI if not just install the salesforce CLI again and replace the path variables with the previous one OR just add the new path variable and delete the previous one.
I hope this works for you as it worked for me.
ALL THE BEST!!
@Ashutosh Krishna Sorry i didin't got this, can you explaine it with more details? please