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 force:auth:web:login -r https://login.salesforce.com ==> Browser just loads forever. #881

Closed
shashikantMkumar opened this issue Feb 25, 2021 · 17 comments
Labels
investigating We're actively investigating this issue

Comments

@shashikantMkumar
Copy link

Summary

Short summary of what is going on or to provide context.

Steps To Reproduce:

  1. Either run the command "sfdx force:auth:web:login -r https://login.salesforce.com" from command line or command pallet is visual studio code.
  2. The browser opens the salesforce authentication page.
  3. After entering the credentials & authorizing CLI for access, browser just loads forever.
  4. I even tried by changing default browser to 'Edge', 'FireFox', 'Chrome' one by one, none worked.

Expected result

The org should be successfully authorized.

Actual result

Browser loads for ever..

Additional information

@shashikantMkumar shashikantMkumar added the investigating We're actively investigating this issue label Feb 25, 2021
@github-actions
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.

@grieve54706
Copy link

Try

 sfdx plugins:uninstall auth

@jsmithdev
Copy link

jsmithdev commented Feb 25, 2021

Try

 sfdx plugins:uninstall auth

tried but no luck.

i also tried npm i [email protected] -g to install older version with no luck

going to try installing other versions...

we can not make and edit lwc without sfdx so this is very bad. if anyone finds a work around so we can do our jobs, please share

@annguyen209
Copy link

annguyen209 commented Feb 26, 2021

Got the same problem today. Here are the last lines when using flag --dev-debug
` sfdx:WebServer DEBUG Starting web server +0ms

sfdx:WebServer DEBUG Nothing listening on host: localhost port: 1717 - good! +20ms

sfdx:WebServer DEBUG socket connection initialized from 127.0.0.1 +5s

sfdx:WebServer DEBUG socket connection initialized from 127.0.0.1 +249ms`

@grieve54706
Copy link

grieve54706 commented Feb 26, 2021

Now, My condition is

❯ sfdx version
sfdx-cli/7.88.4-3b2e55c3f1 linux-x64 node-v14.15.4

❯ sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.5 (core)
auth 1.4.8 (core)
config 1.2.4 (core)
generator 1.1.5 (core)
salesforcedx 48.22.11 (48.22.11)
├─ salesforce-alm 48.24.3
├─ salesforcedx-templates 48.18.0
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7
└─ custom-metadata 1.0.4
sfdx-cli 7.88.4 (core)
sfpowerkit 2.6.5
telemetry 1.1.1 (core)

❯ sfdx plugins
salesforcedx 48.22.11 (48.22.11)
├─ salesforce-alm 48.24.3
├─ salesforcedx-templates 48.18.0
├─ custom-metadata 1.0.4
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7
sfpowerkit 2.6.5

I tried to upgrade and downgrade salesforcedx and sfdx-cli

Finally, I find my sfdx plugin has auth

I uninstall it, then it works

Maybe you can try to downgrade salesforcedx to my version

@annguyen209
Copy link

@grieve54706 Nice, it works for me. Thanks.

@jsmithdev
Copy link

@grieve54706 thanks for the listing 👍

#864 seems same issue.

steps

npm i [email protected] -g

sfdx plugins:install [email protected]

...and used nvm for node version switching

nvm install 14.15.4

nvm use 14.15.4

results

once sfdx force:auth:web:login worked, i ran and got below:

sfdx -v
sfdx-cli/7.88.4 linux-x64 node-v14.15.4

sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.10.0
├─ @oclif/plugin-update 1.3.10
└─ @oclif/plugin-help 2.2.3
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.7 (core)
auth 1.4.8 (core)
config 1.2.5 (core)
generator 1.1.5 (core)
salesforcedx 48.22.11 (48.22.11)
├─ salesforcedx-templates 48.18.0
├─ salesforce-alm 48.24.3
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7
└─ custom-metadata 1.0.4
sfdx-cli 7.88.4 (core)
sfdx-ext 0.0.49
telemetry 1.1.1 (core)

@ghost
Copy link

ghost commented Mar 1, 2021

I'm experiencing same behavior described here on Windows.

sfdx force:auth:web:login -a foobar --instanceurl=https://foobar.my.salesforce.com

I use this command near daily. Was working normally for me earlier today after no login for a week (vacation). Later today after PC restart browser just hangs after entering credentials as described above. URL it hangs on is:

"https://foobar.my.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?source=foo"

when I 'Terminate batch job' from sfdx I land at this URL with 'refused to connect'

"http://localhost:1717/OauthRedirect?code=foo&state=bar"

I thought maybe has to do with update to Powershell 7.2 I did earlier today, but seems others here are experiencing the problem on linux so probably unrelated.

So current theory is VSCode Salesforce Extension Pack plugin updated sfdx (or related package) in the background today and the update introduced this bug.

Not familiar with node TBH and don't seem to have npm/nvm commands in my PATH so not sure how to go about replicating the workaround discussed above. Neither have I ever updated sfdx manually so not too keen to mess about with downgrading - esp as that doesn't seem to have directly helped others. Feel free to tell me if I'm missing something dumb, but I'm happy enough for the moment to not bork my install running commands I don't understand.

Otherwise hope this info helps people cleverer than me to pinpoint the problem. Happy to provide more info if helpful.

sfdx -v
sfdx-cli/7.89.2-d1d2614d02 win32-x64 node-v14.15.4

sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.5 (core)
auth 1.4.8 (core)
config 1.2.4 (core)
generator 1.1.5 (core)
salesforcedx 51.1.1 (core)
├─ user 1.1.2 (core)
├─ limits 1.0.4 (core)
├─ schema 1.0.4 (core)
├─ apex 0.1.4 (core)
├─ templates 51.3.0 (core)
├─ custom-metadata 1.0.11 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
└─ salesforce-alm 51.1.1 (core)
sfdx-cli 7.89.2 (core)
telemetry 1.1.1 (core)

@randal923
Copy link

Having the same issue. Auth does show in my plugins but I can't uninstall it.

sfdx-cli/7.88.4 wsl-x64 node-v14.15.4

@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.7 (core)
auth 1.4.8 (core)
config 1.2.5 (core)
generator 1.1.5 (core)
salesforcedx 51.0.4 (core)
├─ limits 1.0.4 (core)
├─ user 1.1.2 (core)
├─ schema 1.0.4 (core)
├─ apex 0.1.4 (core)
├─ templates 51.2.0 (core)
├─ custom-metadata 1.0.11 (core)
├─ salesforce-alm 51.0.2 (core)
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.88.4 (core)
telemetry 1.1.1 (core)
Uninstalling auth... !
 ›   Error: auth is not installed

@grieve54706
Copy link

grieve54706 commented Mar 1, 2021

Having the same issue. Auth does show in my plugins but I can't uninstall it.

sfdx-cli/7.88.4 wsl-x64 node-v14.15.4
...

My case is I install another auth plugin
You can just try to do this

sfdx plugins:install [email protected]

@randal923
Copy link

Having the same issue. Auth does show in my plugins but I can't uninstall it.
sfdx-cli/7.88.4 wsl-x64 node-v14.15.4

@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-help 3.2.2 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.5 (core)
@oclif/plugin-update 1.4.0-2 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.7 (core)
auth 1.4.8 (core)
config 1.2.5 (core)
generator 1.1.5 (core)
salesforcedx 51.0.4 (core)
├─ limits 1.0.4 (core)
├─ user 1.1.2 (core)
├─ schema 1.0.4 (core)
├─ apex 0.1.4 (core)
├─ templates 51.2.0 (core)
├─ custom-metadata 1.0.11 (core)
├─ salesforce-alm 51.0.2 (core)
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.88.4 (core)
telemetry 1.1.1 (core)
Uninstalling auth... !
 ›   Error: auth is not installed

My case is I install another auth plugin
You can just try to do this

sfdx plugins:install [email protected]

That worked for me. Thanks!!

@rtoepfer
Copy link

rtoepfer commented Mar 1, 2021

I've been running sfdx force:auth:device:login as a workaround while this issue is open.

@ilo4
Copy link

ilo4 commented Mar 2, 2021

I had the same issue.
Downgrading with " sfdx plugins:install [email protected] " did not work for me.

I effectively had to uninstall salesforce cli; reinstall latest version and then run :
sfdx plugins:uninstall auth

With that it's working again for now ...

@amanrawat1993
Copy link

@grieve54706 thanks for the listing 👍

#864 seems same issue.

steps

npm i [email protected] -g

sfdx plugins:install [email protected]

...and used nvm for node version switching

nvm install 14.15.4

nvm use 14.15.4

results

once sfdx force:auth:web:login worked, i ran and got below:

sfdx -v
sfdx-cli/7.88.4 linux-x64 node-v14.15.4

sfdx plugins --core
@oclif/plugin-autocomplete 0.3.0 (core)
@oclif/plugin-commands 1.3.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.10.0 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/lwc-dev-server 2.10.0
├─ @oclif/plugin-update 1.3.10
└─ @oclif/plugin-help 2.2.3
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.6.0 (core)
alias 1.1.7 (core)
auth 1.4.8 (core)
config 1.2.5 (core)
generator 1.1.5 (core)
salesforcedx 48.22.11 (48.22.11)
├─ salesforcedx-templates 48.18.0
├─ salesforce-alm 48.24.3
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7
└─ custom-metadata 1.0.4
sfdx-cli 7.88.4 (core)
sfdx-ext 0.0.49
telemetry 1.1.1 (core)

This one worked for me,

sfdx plugins:install [email protected]
sfdx plugins:install [email protected]

@Rohit496
Copy link

Rohit496 commented Mar 9, 2021

Hello All,
I got some error in jenkins below you can see

C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\SCSDevOps_>C:"Program Files""Salesforce CLI"\bin\sfdx auth:jwt:grant --clientid 3MVG9fe4g9fhX0E43UVmaCSnNuTBm276ttpeJuWSKS0l5TmJXMSGSNJxOgtCwV6kIv8ySP_liAUHKh6p_yRD6 --username [email protected] --jwtkeyfile **** --loglevel DEBUG --setdefaultdevhubusername --instanceurl https://login.salesforce.com/
ERROR running auth:jwt:grant: We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: error:02001005:system library:fopen:Input/output error
[Pipeline] echo
inside rc 0
[Pipeline] error
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: hub org authorization failed
Finished: FAILURE

@ghost
Copy link

ghost commented Mar 10, 2021

This is fixed (for me at least!) as of sfdx-cli v 7.90.2
sfdx -v
sfdx-cli/7.90.2-b8f9206a5c win32-x64 node-v14.15.4

see also
#890 (now closed)

@RodEsp
Copy link
Contributor

RodEsp commented Mar 10, 2021

Yep, this is a duplicate of #890 which was fixed by forcedotcom/sfdx-core#384.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

10 participants