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

vsCode Authorize an Org freezes in RemoteAccessAuthorizationPage #2931

Closed
ghost opened this issue Feb 9, 2021 · 14 comments
Closed

vsCode Authorize an Org freezes in RemoteAccessAuthorizationPage #2931

ghost opened this issue Feb 9, 2021 · 14 comments
Labels
status:needs cli support Requires changes to SFDX CLI

Comments

@ghost
Copy link

ghost commented Feb 9, 2021

Summary

I created a new project with manifest in VS Code, but I am not able to authorize an Org to it. When I run crtl+shift+P >> SFDX: Authorize an Org >> Sandbox, it opens the authentication screen (test.salesforce.com), then I insert login + password and it keeps loading "forever", never actually authenticating. I saw some similiar issues here and I have already tried updating VS Code, SFDX CLI, Node JS; and changing the default browser. I also tried running
sfdx force:auth:web:login --setalias someAlias --instanceurl --setdefaultusername
but same result.

Steps To Reproduce:

  1. Create a project with manifest
  2. Run SFDX: Authorize an Org with Sandbox (test.salesforce.com)
  3. Insert login + password

Expected result

Org should be authenticated, so I could retrieve code from Org to Manifest.

Actual result

It stays frozen in loading screen.

image

image

VS Code Version: 1.53.0

SFDX CLI Version: sfdx-cli/7.86.3 linux-x64 node-v14.15.4

OS and version: Linux Ubuntu 20.04 LTS

@ghost ghost changed the title vsCode Authorize an Org freezes after inserting credentials vsCode Authorize an Org freezes in RemoteAccessAuthorizationPage Feb 10, 2021
@smaddox-sf
Copy link
Contributor

@MeFon - Thanks for reaching out. Few questions:

  • What version of the Salesforce extensions are you running? I know you mentioned updates, but wanted to double check the extension version.
  • Do you have the 'Experimental Deploy Retrieve' option enabled in VS Code Settings?
  • Even though you continue to see the notification that the authorization is still happening - is the Org connected? I'm unclear if the auth is not working or that the notification is never telling you the auth completed. If you aren't sure, can you try another command after the auth and share the results?

@ghost
Copy link
Author

ghost commented Feb 18, 2021

Hi @smaddox-sf
Thanks for the reply.

  • Salesforce Extension Pack v.50.17.0
  • Experimental Deploy Retrieve Disabled (but I tried with both options)
  • If I try another command (ex: create apex class) it runs fine. But the auth never completes. If I f5 in the login auth page while loading, it returns OAUTH_APPROVAL_ERROR_GENERIC (but I guess I relly shouldn't do that). If I cancel it in vsCode, it returns ' sfdx force:auth:web:login --setalias bombrilQA --instanceurl https://test.salesforce.com --setdefaultusername
    ended'. But I can't, in any wyas, retrieve nor deploy stuff to org.

@ghost
Copy link
Author

ghost commented Feb 18, 2021

more info:

$ sfdx plugins --core
@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.4 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
alias 1.1.3 (core)
analytics 1.12.1 (core)
auth 1.3.0 (core)
config 1.2.1 (core)
generator 1.1.3 (core)
salesforcedx 50.7.0 (core)
├─ schema 1.0.1 (core)
├─ salesforce-alm 50.7.0 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
├─ custom-metadata 1.0.10 (core)
├─ apex 0.1.4 (core)
└─ templates 50.1.0 (core)
sfdx-cli 7.82.0 (core)

@matthias-seibert-tng
Copy link

Hi everyone. I'm experiencing a similar behavior on my machine. The local server on port 1717 is started, but the redirect from the browser is never registered for some reason.

VS Code Version: 1.53.2
Salesforce Extension Pack Version: 49.10.0
OS and version: Arch Linux x86_64

@dhbahr
Copy link

dhbahr commented Feb 23, 2021

@matthias-seibert-tng as far as I can tell the issue is not with the VSCode extension pack, but with sfdx-cli itself. I started experiencing exactly what you describe after upgrading to 7.86.3, and downgrading to 7.26.0 solves it.

@matthias-seibert-tng
Copy link

@matthias-seibert-tng as far as I can tell the issue is not with the VSCode extension pack, but with sfdx-cli itself. I started experiencing exactly what you describe after upgrading to 7.86.3, and downgrading to 7.26.0 solves it.

Thanks! I ended up downgrading SalesforceDx to 48.22.11 which fixed the issue for me for now. Just for reference, the command I used is sfdx plugins:install [email protected]. Cheers!

@dhbahr
Copy link

dhbahr commented Feb 24, 2021

Thanks! I ended up downgrading SalesforceDx to 48.22.11 which fixed the issue for me for now. Just for reference, the command I used is sfdx plugins:install [email protected]. Cheers!

And I can confirm that worked for me as well on the new 7.88.4. Thanks @matthias-seibert-tng

@dhbahr
Copy link

dhbahr commented Feb 24, 2021

@matthias-seibert-tng just as a note, [email protected] also works for me. 50.2.0 crashes with a different issue.

@ghost
Copy link
Author

ghost commented Feb 24, 2021

Glad it worked for you guys!

I know it seems really drastic.... but I formatted my computer hahahahaha it works now though

@mxalfrod
Copy link

I had the same issue and just by uninstalling and reinstalling Salesforce CLI from my windows computer fixed the issue.

@colbylane
Copy link

I've tried reinstalling as well but it didn't fix the issue. Downgrading to [email protected] has resolved it though.

Versions:
sfdx-cli/7.89.2-d1d2614d02 win32-x64 node-v14.15.4
@salesforce/sfdx-diff 0.0.6
salesforcedx 48.22.11 (48.22.11)
├─ salesforce-alm 48.24.3
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7
├─ salesforcedx-templates 48.18.0
└─ custom-metadata 1.0.4

@smaddox-sf
Copy link
Contributor

As noted above, the root cause is within the CLI. We will keep this issue open for visibility or feel free to follow the CLI issue directly: forcedotcom/cli#881

@lcampos
Copy link
Contributor

lcampos commented Mar 2, 2021

Hi, thanks for logging this and providing info on what you are experiencing. The issue is with the Salesforce CLI (the vscode extensions delegate the auth flow to it). The CLI team is actively looking into this and you can follow issue forcedotcom/cli#890 for updates. I'll close this issue as a duplicate.

@lcampos lcampos closed this as completed Mar 2, 2021
@FedPete
Copy link

FedPete commented Apr 20, 2021

I think the problem lies in GIT preparation.
I had this problem too. Left VCode terminal open for some time and saw a lot of Git time outs.
I didn't have a Git repo for my Trailhead project (didn't know I needed one).
So I did a git init and the problem when away in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs cli support Requires changes to SFDX CLI
Projects
None yet
Development

No branches or pull requests

7 participants