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

Unable to authorize org due to Salesforce CLI extension issue #3459

Closed
bmathew83 opened this issue Jul 30, 2021 · 39 comments
Closed

Unable to authorize org due to Salesforce CLI extension issue #3459

bmathew83 opened this issue Jul 30, 2021 · 39 comments
Assignees

Comments

@bmathew83
Copy link

Issue Type: Bug

Even after reinstallation of the Extension Pack, it is not working like earlier.

  1. Ctrl + Shift + P to SFDX:Authorize an Org
  2. Select test.salesforce.com Sandbox
  3. Type Name of Org and Enter.
  4. A browser window should pop-up for user to sign in to desired org BUT this is not happening.

ERROR : SFDX Authorize an Org failed to Run
Source: Salesforce CLI Integration (Extension)

Extension version: 52.7.0
VS Code version: Code 1.58.2 (c3f126316369cd610563c75b1b1725e0679adfb3, 2021-07-14T22:10:15.214Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 1190)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 11.77GB (3.38GB free)
Process Argv --crash-reporter-id 27ab91dc-355c-4823-b072-477ecd035aca
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30345471
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlang:30333561
binariesv615:30325510
pythonvssor306:30344512
bridge0708:30335490

@smaddox-sf
Copy link
Contributor

Hi @bmathew83 - Have you installed the sfdx CLI in addition to the VS Code extension pack? Under the hood, we use the CLI to execute some of the commands. (including the Authorize an Org command). If you haven't installed it, you can find the instructions here: https://developer.salesforce.com/tools/vscode/en/getting-started/install/#salesforce-cli

If you have the CLI installed, please respond with the CLI version number and paste the full contents of the output panel from VS Code after executing the Authorize command.

@bmathew83
Copy link
Author

bmathew83 commented Aug 2, 2021 via email

@bmathew83
Copy link
Author

bmathew83 commented Aug 2, 2021 via email

@Jmahony92
Copy link

I am having the same issue, reinstalling doesnt seem to do anything

@Andras23102019
Copy link

+1

@smaddox-sf
Copy link
Contributor

Hi @bmathew83 - Unfortunately none of the screenshots came through to GitHub, so I can't see the details. Can you check out this CLI issue and workaround to see if it resolves your issue?

I'm not sure if that is the root cause since I can't see the screenshots. If the CLI issue & workaround I linked doesn't resolve it, can you retry to paste the follow-up info we can try to diagnose the problem?

@no-response
Copy link

no-response bot commented Aug 13, 2021

This issue has been automatically closed because there has been no response to our request for more information from the original author. Currently, there is not enough information provided for us to take action. Please reply and reopen this issue if you need additional assistance.

@no-response no-response bot closed this as completed Aug 13, 2021
@bmathew83
Copy link
Author

image

image

image

image

image

image

@bmathew83
Copy link
Author

@smaddox-sf - Thanks for sending the link forcedotcom/cli#1104 (comment) to try and solve the above issue. I'm looking into this whether it will solve the main issue.

But I've uploaded some images I sent as reply via email I sent back in Aug 2021. **since you mentioned you weren't able to see them in Github. But I hope you can help me solve this. Thank you.

@bmathew83
Copy link
Author

@smaddox-sf - Just following up on this issue which is still not resolved. The link you provided is not the same issue as I encounter here.
@github-actions - Since its old issue, could someone else help, if @smaddox-sf is not available?

@AnanyaJha
Copy link
Collaborator

Hi @bmathew83 thanks for following up on this one! Are you still running into this issue with the latest version of our extensions (v53.4.2) ?

@bmathew83
Copy link
Author

Hi @AnanyaJha - Thanks for the speedy reply. I'll check if the latest version of extension is being used on my system and confirm back to you shortly.

@bmathew83
Copy link
Author

bmathew83 commented Dec 9, 2021

@AnanyaJha - Yes and still running into this issue with the latest version of the CLI extension (v53.4.2) .

image

@bmathew83
Copy link
Author

image
@AnanyaJha

@bmathew83
Copy link
Author

@AnanyaJha - Good afternoon ! just following up on this. I'm still running into this issue with the latest version of the CLI extension (v53.4.2) . Could you please help?

@randi274
Copy link
Contributor

Hi @bmathew83, sorry you're still working with this! Can you run sfdx version --verbose --json and send us the results? Also, are you able to run this command without error in the terminal, from the root of your project directory? sfdx force:auth:web:login --setalias testOrgName --instanceurl https://test.salesforce.com --setdefaultusername

@bmathew83
Copy link
Author

Hi @randi274 - This is the result which I get when running the first command you asked. see below screenshot.

image

This is the result which I get when running the second command you asked. see below screenshot.

image

@randi274
Copy link
Contributor

@bmathew83 thanks for sharing! It looks like you're having some issues with setting up the Salesforce CLI. Can you install the Salesforce CLI (instructions here) and try the command again? If you already have the CLI installed, you may just need to update your PATH variable (setting PATH=~/sfdx/bin:$PATH in your ~/.bashrc, ~/.bash_profile, or ~/.zshrc) The CLI is still a requirement for the VS Code Salesforce Extensions for now, though we're working to remove that requirement soon.

@bmathew83
Copy link
Author

Hi @randi274 - Thanks for your patience and support towards this.
I installed Salesforce CLI from the link you sent me. (see links and screenshots below)

https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm#sfdx_setup_install_cli_windows
image

From there I went to https://developer.salesforce.com/tools/sfdxcli
image

Here's my system variable Path setup under Environment variables:-
image

and here's the user variables setup under Environment variables:-
image

BUT, I'm still unsuccessful in running those commands as you advised. I get the same error where it says "The system cannot find the path specified".
image

I'm not familiar with ~/.bashrc, ~/.bash_profile, or ~/.zshrc. Could you please send step by step directions to updating the path?

Thank you so much

@randi274
Copy link
Contributor

That's all looking pretty good! Have you done a hard refresh of VS Code since updating the variables? If that variable is available in the Systems Variable section, that looks to be the right setup. When you run echo %Path%, that path should be included, as shown here.

@bmathew83
Copy link
Author

@randi274 - Thanks for confirmation of environment variables.

I checked the link you sent in previous message and followed one of the users' (named vanessen) comments (the last comment) where two folders to the path were conflicting. I deleted the previous folder named C:\Program Files\Salesforce\CLI\bin but running those commands sfdx version --verbose --json didn't work.

The echo %Path% command also shows the following result(see screenshot).
image

@bmathew83
Copy link
Author

@randi274 - Subsequently, trying to authorize an org gives this error now.
image

FYI- Also, there was another error in bottom right of VS Code regarding the JDK not compatible (current zulu 16), so I downgraded to zulu 11). It mentioned that this was affecting the extensions.

@bmathew83
Copy link
Author

@randi274 - Not sure if this is related but still putting it out there.

image

@bmathew83
Copy link
Author

I fixed this issue only by formatting the laptop. Installed VS Code again and all the steps mentioned in here (https://developer.salesforce.com/tools/vscode/en/getting-started/install#salesforce-cli). Working fine now. Please close this ticket.

@AnanyaJha
Copy link
Collaborator

Glad you were able to resolve this issue @bmathew83! Closing ticket now

@parami1998
Copy link

hi

im facing same problem as u had please help me out to solve .

my org is not getting authorized , its showing salesforce CLI extention problem .

Screenshot (14)

@parami1998
Copy link

I fixed this issue only by formatting the laptop. Installed VS Code again and all the steps mentioned in here (https://developer.salesforce.com/tools/vscode/en/getting-started/install#salesforce-cli). Working fine now. Please close this ticket.

i still have same issue , can u help me out buddy

Screenshot (14)

@dee1110
Copy link

dee1110 commented Jan 26, 2023

I fixed this issue only by formatting the laptop. Installed VS Code again and all the steps mentioned in here (https://developer.salesforce.com/tools/vscode/en/getting-started/install#salesforce-cli). Working fine now. Please close this ticket.

i still have same issue , can u help me out buddy

Screenshot (14)

Did you resolve this? I'm facing the same issue

@klewis-sfdc
Copy link
Contributor

Hi @dee1110, can you let us know what version of the extensions you have installed?

@dee1110
Copy link

dee1110 commented Feb 2, 2023

image
@klewis-sfdc
of all the extensions on vs code? Pls be more specific. Salesforce CLI Integration v56.16.0
All extensions are the most recent versions

@klewis-sfdc
Copy link
Contributor

Great, thank you. Can you also verify which version of the sfdx cli you have installed? You should be able to run sfdx --version and see an output something like you see at the top of this page.

@dee1110
Copy link

dee1110 commented Feb 3, 2023

image

It never picks up the CLI installed on my laptop although I have
image
@klewis-sfdc Also I appreciate your responses helping me get my vs code up and running. it's been several weeks trying to figure out what's wrong. i'm not a developer so I appreciate your assistance

@klewis-sfdc
Copy link
Contributor

@dee1110 It looks like sfdx might not be in your PATH, which tells your computer how to find it. Can you try following the instructions here to add sfdx to your PATH and see if that resolves your issue?

@dee1110
Copy link

dee1110 commented Feb 3, 2023

trying rn. @klewis-sfdc

@dee1110
Copy link

dee1110 commented Feb 3, 2023

@klewis-sfdc VS Code FINALYYYYYYYY recognizes my sfdx. THANK YOU SO MUCH!

@klewis-sfdc
Copy link
Contributor

Glad its working for you now, @dee1110. Happy to help.

@dee1110
Copy link

dee1110 commented Feb 24, 2023

Hello @klewis-sfdc
I'm struggling with using vscode for deployments and unfortunately there's no much resources online. Is it possible to get a walkthrough?

@dee1110
Copy link

dee1110 commented Feb 24, 2023

image

Hello @klewis-sfdc I was wondering if you could please help me out with this error

@klewis-sfdc
Copy link
Contributor

Hi @dee1110,
This link should help you to set a default username and email in git: https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git

And here is a link to our documentation that includes details about the different development models and how to deploy/retrieve metadata using VSCE's deploy*/retrieve*/push*/pull* commands: https://developer.salesforce.com/tools/vscode/en/apex/writing

I'm going to close this issue. If you have any specific additional questions please open a new issue.

@parami1998 if you are still seeing the issue will you also please create a new issue with your specific repo steps? Thank you!

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

10 participants