Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorize An Org failed because force:auth:web:login is not a sfdx command #2869

Closed
MrFatt opened this issue Jan 16, 2021 · 19 comments
Closed

Comments

@MrFatt
Copy link

MrFatt commented Jan 16, 2021

Summary

When I was following the instruction in this tutorial: https://trailhead.salesforce.com/content/learn/projects/quickstart-vscode-salesforce/use-vscode-for-salesforce, the Authenticate to Your Playground step failed. And in the output console I saw

Starting SFDX: Authorize an Org

15:23:41.710 sfdx force:auth:web:login --setalias VSCodePlayground --instanceurl https://login.salesforce.com --setdefaultusername
 ›   Warning: force:auth:web:login is not a sfdx command.
Did you mean auth:web:login? [y/n]: 
 ›   Error: Run sfdx help force for a list of available commands.
15:23:47.396 sfdx force:auth:web:login --setalias VSCodePlayground --instanceurl https://login.salesforce.com --setdefaultusername
 ended with exit code 127

I believe it's caused by the new version sfdx cli deprecates the force versions of these commands

Steps To Reproduce:

  1. Install the latest sfdx cli
  2. Install the Salesforce Extension in VSCode
  3. Run SFDX: Authorize an Org in VSCode

Expected result

The org is authorized successfully

Actual result

authorization failed with the error Run sfdx help force for a list of available commands.

Additional information

image

VS Code Version: Version: 1.51.1

SFDX CLI Version: sfdx-cli/7.83.0-eba9c6a927 darwin-x64 node-v12.18.3

OS and version: v50.13.0

@4388331
Copy link

4388331 commented Jan 16, 2021

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/plugin-auth@1.4.3"

Got solution here forcedotcom/cli#757 (comment)

@KuljitSinghTomar
Copy link

Running sfdx update on my mac terminal fixed this issue for me. Thank you @4388331 for the pointer!

@roshani22495
Copy link

Thank you @4388331. I was also facing the error while running the command 'Authorize dev hub' . After running command "sfdx plugin:install @salesforce/plugin-auth@1.4.3" on CMD, it worked fine for me.

@CosplayCoder
Copy link

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/plugin-auth@1.4.3"

Got solution here forcedotcom/cli#757 (comment)

This fixed the issue for me as well! Thanks for sharing!

@JohnnySalesforce
Copy link

Thanks @4388331 - worked for me as well!

@smaddox-sf
Copy link
Contributor

as noted above, latest CLI resolved this.

@ElvisPlatini
Copy link

Thanks @4388331.
You solved my problem.

@jeansgan
Copy link

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/plugin-auth@1.4.3"

Got solution here forcedotcom/cli#757 (comment)

Thank you @4388331 ... It works for me :D

@hussain1901
Copy link

I resolved the same issue with the plugin
Run this in CMD "sfdx plugin:install @salesforce/plugin-auth@1.4.3"

Got solution here forcedotcom/cli#757 (comment)

Thanks for the solution. It worked for me.

@LineeshNeel
Copy link

I had also got the same issue.
First ran "sfdx update" in cmd.

Then ran "sfdx plugin:install @salesforce/plugin-auth@1.4.3"
Got the following warning: " Warning: plugin:install is not a sfdx command".

Gave 'y' for the question "Did you mean plugins:install? [y/n]".
And then it worked.

@srivardhan1607
Copy link

Ran "sfdx plugin:install @salesforce/plugin-auth@1.4.3"
Thanks for the solution.

@naheedtn
Copy link

naheedtn commented Oct 11, 2023

I was having the same issue, for me, just "sfdx update" in cmd worked.
Thank you to all who contributed.

@anika-shirolkar
Copy link

For me the issue was fixed when I ran "sfdx update". Please note it worked when I used x in sfdx and not c!

@naheedtn
Copy link

Yes correct "sfdx update" indeed.

@kimbersHolland
Copy link

"sfdx update" worked even in 11/2023 on version 7.209.6

@harshinichowdary1357
Copy link

sfdx update worked for me Thank you..!

@zaferaydinosf
Copy link

worked for me as well.

@Praneeth-L
Copy link

I got this error in Macbook, I tried Bothe the commands
sfdx update
sfdx plugin:install @salesforce/plugin-auth@1.4.3
it did not worked for me
can you tell me If I should set path for 'sfdx cli' in Mac if yes please tell me how

@GulT1
Copy link

GulT1 commented May 22, 2024

worked for me too, thank you for the solutions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests