Repository navigation
Description
All,
This all started last Wednesday, February 24 very late in the day. I have not been able to get connected to the Salesforce Sandbox since then. I have performed the sfdx update several times since and this has not helped. Can anyone help me. I have 4 LWC's that need to be published.
I am on a Windows 10 laptop with the latest patches and updates from Microsoft Version 10.0.18363. When I attempt to Authorize an Org it opens Google Chrome Version 88.0.4324.190 (Official Build) (64-bit). I login using the login I've been using successfully since yesterday, I get the prompt to Allow Access, and it just hangs. I am currently running VS Code Version: 1.53.2. I have the Salesforce Extension Pack v51.2.0, and the same for the Salesforce CLI Integration.
I'm using sfdcLoginUrl = https://test.salesforce.com
When I execute the Authorize an Org it sends me to the following URL provided I have Revoked the previous attempt: https://<my_org_name>/setup/secur/RemoteAccessAuthorizationPage.apexp?source="very long string"
I am unable to find port 1717 running using suggestions previously mentioned.
I have uninstalled VS Code twice and deleted everything the second time before re-installing.
I have switched the Default browser to Edge each time and this doesn't work. I even tried IE once!!
I look for node.js running and if I kill that process the web browser immediately throws me into the unable to open local port 1717.
I've tried sfdx auth:web:login instead of sfdx force:auth:web:login and this does not work.
After the failed attempts I Revoke the Salesforce CLI found under my login ID.
In my troubleshooting I've seen OAuth Error
I have set the Google Chrome to run in Windows 8 compatibility mode as well. This doesn't help either.
I added the C:\Windows\System32 to the PATH environment variable as well.
I also tried logging in with our Salesforce Admin credentials and that didn't work either.
What am I missing here. Can someone please advise?
Thank you.
Activity
team-seavus commentedon Mar 1, 2021
forcedotcom/salesforcedx-vscode#2931
This helped me:
sfdx plugins:install [email protected]kadantsam commentedon Mar 1, 2021
Team-seavus,
Thank you for the reply!! This did not work for me. To re-iterate, I attempt to "Authorize an Org" and it opens up Google Chrome and prompts me if it is okay for Access and click allow then it redirects me to the following URL and just hangs:
https://{my org}.my.salesforce.com/_ui/identity/oauth/ui/AuthorizationPage
Any help is greatly appreciated.
team-seavus commentedon Mar 1, 2021
Sorry to hear that, my problem was very similar.
Maybe you can try with different Browser or check the steps given here: forcedotcom/salesforcedx-vscode#2996 (uninstall->install).
kadantsam commentedon Mar 1, 2021
Switched to Microsoft Edge and still no good. I've re-installed twice so far. Still NFG!!
I just looked at the link you provided and I have the same values that the user reported when he re-installed, but this still does not work:
Version: 1.53.2 (user setup)
Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4
Date: 2021-02-11T11:48:04.245Z
Electron: 11.2.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Windows_NT x64 10.0.18363
BTW, one more note!! Raul suggested using the following command:
// authorize production org
sfdx auth:device:login
The above worked to get me into the production server, however, when I try the following:
// authorize sandbox
sfdx auth:device:login -r https://test.salesforce.com
I get the following error:
"ERROR running auth:device:login: Value is not an string"
ImJohnMDaniel commentedon Mar 1, 2021
Some of my team have seen similar issues. We had to downgrade to 7.83 to get stable again.
kadantsam commentedon Mar 1, 2021
ImJohnMDaniel, thank you very much for the suggestion. I will try this next and report on the my progress.
kadantsam commentedon Mar 1, 2021
ImJohnMDaniel, I'm confused, what exactly did your team downgrade to 7.83? I presumed you were talking about the Salesforce CLI. Can you please provide a little more detail? Thanks.
ImJohnMDaniel commentedon Mar 1, 2021
All of the versions since 7.84 have been unstable in some manner. We are not bother to downgrade specific elements of the CLI as that can cause more chaos. My team saved the installation media for v7.83. We have uninstalled any version higher than that and have installed the 7.83 version. Most of the team are also using the environment variable
SFDX_DISABLE_AUTOUPDATE(ref) to prevent automatic upgrades until the CLI gets stable again.FYI @amphro @clairebianchi
kadantsam commentedon Mar 1, 2021
Thank you again for the information. I can't seem to find the version you are referencing. Do you have any idea how I can find that version?
ImJohnMDaniel commentedon Mar 1, 2021
We saved the installed from when it was originally released. Maybe @amphro or @clairebianchi know how to access v7.83 from the public
kadantsam commentedon Mar 1, 2021
All,
Thanks to ImJohnMDaniel I've got it fixed.
https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode
Thank you everyone.
qwikag commentedon Mar 1, 2021
@kadantsam
Sorry this did not work. (uninstall and DL the extensions)
I followed your instruction to the letter.
I uninstalled the visualforce extension (as per your instruction to uninstall any)then restarted.
and I installed the downloaded verion as advised, it did nothing.
SO I went a step further and uninstalled all Salesforce extensions and even removed the folders within my HOME folder.
I then re-added the extension, and now it just tells me it is successful but does not open the browser at all and does not connect the org.
To the developers
This problem was resolved, once upon a time, but has come back again.
PLEASE can you employ an Automated Testing regime to ensure you stop regressing code.
I had this problem in a previous version. Now it is back
I recently upgraded again due to a different issue with retrieval and deployment, and now this Auth issue is back.
qwikag commentedon Mar 1, 2021
Updated CLI from 7.88.4-3b2e55c3f1 to 7.89.2-d1d2614d02...
NOTHING WORKS!
qwikag commentedon Mar 2, 2021
removed cli software via WIN10 REMOVE SOFTWARE Feature
Reinstalled via Node
Same problem, does not access localhost
this is my setup:
sfdx --version
sfdx-cli/7.89.2 win32-x64 node-v14.16.0
sfdx plugins
no plugins installed
sfdx plugins --core
You acknowledge and agree that the CLI tool may collect usage information, user environment, and crash reports for the purposes of providing services or functions that are relevant to use of the CLI tool and product improvements.
@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.10.0 (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.9 (core)
config 1.2.5 (core)
generator 1.1.5 (core)
salesforcedx 51.1.1 (core)
├─ limits 1.0.4 (core)
├─ user 1.1.2 (core)
├─ schema 1.0.4 (core)
├─ templates 51.3.0 (core)
├─ custom-metadata 1.0.11 (core)
├─ apex 0.1.4 (core)
├─ salesforce-alm 51.1.1 (core)
└─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
sfdx-cli 7.89.2 (core)
telemetry 1.1.1 (core)
13 remaining items
superkencodes commentedon Mar 3, 2021
Here is my work-around in case anyone is interested:
type this in your ide's terminal:
sfdx force:auth:device:login -r https://test.salesforce.comyou will be prompted with a response similar to this:
Click on the link and enter in the code, it will redirect you to the test.salesforce.com login page. From there just login to whatever sandbox you are trying to connect to your ide.
This worked for me and bypassed the Authorization hang and invalid session id errors I was faced with.
prudev commentedon Mar 3, 2021
I'm facing this issue to. I'm on Windows 10, VS Code version is 1.53.2, CLI version is sfdx-cli/7.89.2-d1d2614d02 win32-x64 node-v14.15.4.
The device flow work-around worked for me also:
sfdx force:auth:device:login -r https://test.salesforce.comPlease let us know when auth:web:login is fixed.
cgjerdingen commentedon Mar 3, 2021
Multiple developers here are having the same issue here at Carlson School. auth:device:login workaround mentioned by @superkencodes worked for us.
Please let us know when this issue is resolved.
tronic111 commentedon Mar 3, 2021
After completely removing Salesforce CLI from my system and everything else I could find related to it and then reinstalling I was able to get:
sfdx force:auth:device:login -r https://test.salesforce.com
to work.
JohnTheRedeemer commentedon Mar 3, 2021
The
sfdx force:auth:device:loginworked for me, thanks for the workaround! Much less convenient than my normal worfklow, hopefully they fix this quick!shetzel commentedon Mar 3, 2021
The fix was made in the
@salesforce/corelibrary for this and the@salesforce/plugin-authplugin was updated (v1.4.10) to use that version. See this PR for details: forcedotcom/sfdx-core#384We want to thank and give credit to @hansalves for submitting the PR. We cherry-picked and merged his fix to get it into a release as soon as possible.
There are some options for getting this fix.
sfdx plugins:install @salesforce/plugin-auth. Just remember that you have it installed this way and are overriding the core version included with the CLI.In the process of moving code to open source there have been some unfortunate regressions with several of the new OSS plugins, auth is one of them. As we move the code we do our best to improve it (some of it was written 6 years ago and needed updating) while maintaining stability and ensuring parity with the old plugin version with unit tests, integration tests, etc. We're human and mistakes are made despite our best efforts. We try to get these issues addressed as quickly as possible and very much appreciate the effort and understanding of everyone in the community.
CatoCoder commentedon Mar 4, 2021
Following
qwikag commentedon Mar 5, 2021
BTW: If anyone can explain the difference between the win10 download versus the Node install, please visit here to answer my question on Stackexchange. https://salesforce.stackexchange.com/questions/335932/how-do-i-best-switch-versions-of-sfdx-and-plugins
All is well again for me. I am node connected.
qwikag commentedon Mar 5, 2021
Can someone advise what the fix was, and what it was related to.
The reason I ask is because the bug showed itself when the browser was trying to connect to localhost, and that has device implications.
So what was the general idea of the fix?
hansalves commentedon Mar 5, 2021
@qwikag This is the commit that fixes the bug.
Basically the local server was created and set to listen to port 1717 but the event handler that processes the callback was only added if the server wasn't listening yet. Because of this, the handler was never added so the local server wouldn't do anything with the callback request and just hang.
qwikag commentedon Mar 5, 2021
@hansalves
Thank you you for a concise answer that is great news!
So it means there were no external factors, and all the suggestions from the masses of port changes and proxys settings and system environment variables etc, was pointless, they probably had a different issue.
lukethacoder commentedon Mar 6, 2021
@JohnTheRedeemer 's solution (using
sfdx force:auth:device:logininstead) seems to work nicely.if you need to auth a sandbox org use the
-r https://test.salesforce.comflag on the end of the command. can add an alias using-a YOUR_ORG_ALIAStoo.sfdx force:auth:device:login -r https://test.salesforce.com -a YOUR_ORG_ALIASupdating the
sfdx-clito version7.90.2has fixed this up.paustint commentedon Mar 18, 2021
I encounter this issue every morning and run
sfdx force:org:list, which seems to refresh the tokens for all of my orgs at once, then it works until the next morning.SimonPerez98 commentedon Mar 18, 2021
i encounter the same issue Today with sfdx auth:web:login -d -a DevHub