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
FDX: Authorize an Org hangs after login attempt #890
Comments
forcedotcom/salesforcedx-vscode#2931 This helped me: |
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. |
Sorry to hear that, my problem was very similar. |
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) BTW, one more note!! Raul suggested using the following command: // authorize production org The above worked to get me into the production server, however, when I try the following: // authorize sandbox I get the following error: |
Some of my team have seen similar issues. We had to downgrade to 7.83 to get stable again. |
ImJohnMDaniel, thank you very much for the suggestion. I will try this next and report on the my progress. |
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. |
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 |
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? |
We saved the installed from when it was originally released. Maybe @amphro or @clairebianchi know how to access v7.83 from the public |
All, Thanks to ImJohnMDaniel I've got it fixed.
|
@kadantsam To the developers I had this problem in a previous version. Now it is back |
Updated CLI from 7.88.4-3b2e55c3f1 to 7.89.2-d1d2614d02... |
removed cli software via WIN10 REMOVE SOFTWARE Feature this is my setup: sfdx --version sfdx plugins sfdx plugins --core @oclif/plugin-autocomplete 0.3.0 (core) |
This issue has been linked to a new work item: W-8956885 |
Just to tag onto this, I'm having the same issue, and following the step list that @kadantsam posted didn't fix it. I've tried re-installing salesforce CLI itself with multiple versions, as well as downgrading the VS Code package, but all still result in the hang after entering credentials. |
None of the solutions online worked for me. |
Guys, when you fix this please provide more detailed instructions about how this is to be installed; including things like proxies etc. Thank you |
Hi @kadantsam and @qwikag, I haven't identified a fix but I believe the issue is related to having a space in the path to your project, e.g. We're triaging a fix but if you can confirm that fixes your problem for now it'd help a lot in making sure there's not another underlying root cause. |
Just tried without a space in the project path without success. Callback to 1717 doesn't complete. |
I try not to put spaces in my paths for this very reason, so that issue is not relevant to my experience. |
Feel free to enage me directly to help with testing. |
@qwikag Can you try to downgrade to version 7.82? This works for me. Only the authorize an org hangs when I using later version. But with this version, everythings works fine. |
This is impacting me as well. none of the suggestions are working for me |
Use this as a workaround for now: |
I get: ERROR running auth:device:login: Value is not a string when trying to use the -r flag. Even against https://test.salesforce.com as suggested in their documentation |
I can confirm that this doesn't work. I had attempted it several times. There is something wrong with that option. |
Here is my work-around in case anyone is interested: type this in your ide's terminal: you 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. |
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: Please let us know when auth:web:login is fixed. |
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. |
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. |
The |
The fix was made in the We 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.
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. |
Following |
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.
|
Can someone advise what the fix was, and what it was related to. |
@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. |
@hansalves |
@JohnTheRedeemer 's solution (using if you need to auth a sandbox org use the
updating the |
I encounter this issue every morning and run |
i encounter the same issue Today with sfdx auth:web:login -d -a DevHub |
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.
The text was updated successfully, but these errors were encountered: