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

SFDX: Authorize an Org failed to run #5194

Closed
Florent330 opened this issue Oct 31, 2023 · 15 comments
Closed

SFDX: Authorize an Org failed to run #5194

Florent330 opened this issue Oct 31, 2023 · 15 comments

Comments

@Florent330
Copy link

Hi,
I'm Windows user and i can no longer deploy with vs code using the "SFDX: Authorize an Org" command. Other commands are also affected, such as "SFDX: Log Out from All Authorized Orgs".
I've tried uninstalling the extensions, then reinstalling them and downgrading, but to no avail.

I did modify the path : C:\Program Files\Salesforce CLI\bin
It used to work and started to bug about a week or two ago.

Could you please help me?

My version :

@salesforce/cli/2.14.6 win32-x64 node-v18.15.0

I currently have the following versions:

@oclif/plugin-autocomplete 2.3.10 (core)
@oclif/plugin-commands 3.0.3 (core)
@oclif/plugin-help 6.0.3 (core)
@oclif/plugin-not-found 3.0.2 (core)
@oclif/plugin-plugins 3.9.2 (core)
@oclif/plugin-search 1.0.3 (core)
@oclif/plugin-update 4.1.2 (core)
@oclif/plugin-version 2.0.3 (core)
@oclif/plugin-warn-if-update-available 3.0.1 (core)
@oclif/plugin-which 3.0.5 (core)
@salesforce/cli 2.14.6 (core)
apex 2.3.20 (core)
auth 2.8.22 (core)
data 2.5.19 (core)
deploy-retrieve 1.19.2 (core)
info 2.6.49 (core)
limits 2.3.39 (core)
login 1.2.37 (core)
marketplace 0.3.0 (core)
org 2.11.4 (core)
schema 2.3.30 (core)
settings 1.4.35 (core)
sobject 0.2.13 (core)
source 2.10.43 (core)
telemetry 2.3.6 (core)
templates 55.5.14 (core)
trust 2.6.20 (core)
user 2.3.37 (core)

Uninstalled JIT Plugins:
community 2.4.6
custom-metadata 2.2.8
dev 1.2.1
devops-center 1.2.3
env 2.2.7
functions 1.22.3
packaging 1.26.4
signups 1.5.5
@salesforce/sfdx-plugin-lwc-test 1.1.0
@salesforce/sfdx-scanner 3.17.0

logVsCode

Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

Copy link

Hello @Florent330 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

@Florent330
Copy link
Author

VSCodeError2

@cristiand391 cristiand391 transferred this issue from forcedotcom/cli Oct 31, 2023
@cristiand391
Copy link
Member

looks like the extensions are failing to call the CLI, transferred to the vscode extensions repo.

@AnanyaJha
Copy link
Collaborator

Thanks for reporting this @Florent330 ! Looks like it might be similar to forcedotcom/cli#2608 - what do you think @CristiCanizales ?

@daphne-sfdc
Copy link
Contributor

Hi @Florent330,
Can you try the following steps?

  1. Open up a new Terminal window and type cd .vscode/extensions
  2. Delete all the previous versions of the Salesforce extensions by running rm -rf salesforce.salesforcedx-vscode*
  3. Reinstall the Salesforce extensions.
  4. Clean your cache by deleting the .sfdx and .sf folders from your project, then running "Developer: Reload Window" from the command palette.
  5. Try to reauthorize your org.

Let me know if this solves your issue.

@Florent330
Copy link
Author

Hi @daphne-sfdc , thanks for your help.
I have this error :
rm -rf salesforce.salesforcedx-vscode
'rm' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Should I delete extensions directly via vs code rather than using a command?

Best regards

@daphne-sfdc
Copy link
Contributor

Hi @Florent330,
Sorry, I forgot that rm -rf is a bash-specific command. Since you're on Windows, use rmdir /s salesforce.salesforcedx-vscode* instead. (Note: I had trouble doing a mass delete using Command Prompt and ended up deleting them one by one, hope your Command Prompt understands mass deletion syntax)

@Florent330
Copy link
Author

Hi @daphne-sfdc ,
I followed the steps (except for the mass delete which didn't work, but I found the files to delete them manually).
The problem is still the same.
errorVsCode1
](url)

@Florent330
Copy link
Author

Could it be due to an incorrect registration variable, for example? Normally I'd check, but now I'm desperate ^^

@daphne-sfdc
Copy link
Contributor

@Florent330
I have several questions for you:

  1. Are there any problems in your Problems tab in the bottom panel?
  2. What is your VSCode version?
  3. Go to your Output tab and select Salesforce CLI from the dropdown. Can you send me what is there?
Screenshot 2023-11-02 at 11 43 22 PM

@Florent330
Copy link
Author

@daphne-sfdc :
1 : no problem detected in problem tab
VSCodeError4

2 :
VSCodeError5

3 :
VSCodeError3

@daphne-sfdc
Copy link
Contributor

What's interesting is that you said you were using SF v2.14.6 CLI, but your screenshot says you are using SFDX v7.209.6 CLI. It seems like you didn't uninstall SFDX before installing SF. I would uninstall both CLI versions and reinstall only SF v2, either 2.14.6 or whichever is the latest version.

@Florent330
Copy link
Author

OMG it works! In fact it was blocking because it seems I had two versions if I understood correctly. I don't know how to thank you, but thank you very much! Have good day ! You're the best !

@daphne-sfdc
Copy link
Contributor

@Florent330 I'm so glad I was able to unblock you. Yes, it was blocking because you had two versions - during the migration from SFDX v7 to SF v2, users are supposed to first uninstall SFDX v7 because SF v2 maps the sf command to sfdx and covers both. 🙂

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

No branches or pull requests

4 participants