Problems with Scratch Orgs Connections

136 views
Skip to first unread message

Łukasz Franczyk

unread,
Mar 29, 2023, 6:54:58 AM3/29/23
to Illuminated Cloud General Discussion
Hello.
I have encountered my problem several times.
When I want to connect to a scratch org thas is already existing (connected to different devhub/or when there is no previosly added conenction to devhub) using OAuth Authentication by web browser or by New Connection using login/password it is often impossible set this connection or even to display that connection in Connections Table after it is created. Even after creating this connection manually in SFDX console and set as defaultusername.


1.PNG


3.PNG

6.png

After using "Authorize using OAuth Connection", it says it's successfully authorized but in fact none of new connection appears:

4.png


Using New Connection button, new connection is created:

2.png

But unfortunately there is no way to set this as current connection:

5.png

Illuminated Cloud 2 version 2.2.6.0

Thanks.
Hope it will be fixed soon.

Scott Wells

unread,
Mar 29, 2023, 9:36:42 AM3/29/23
to Illuminated Cloud General Discussion, lukaszfr...@gmail.com
Hi. It appears that you're creating a native connection to the scratch org. Assuming the project is a source format/SFDX project (specifically has an sfdx-project.json file), you must use a CLI-managed connection and not a native connection. Instead please create an OAuth connection to the scratch org and it should show up in the list of available connections for that project. 

Regards,
Scott Wells

Łukasz Franczyk

unread,
Mar 30, 2023, 3:38:52 AM3/30/23
to Illuminated Cloud General Discussion, sc...@illuminatedcloud.com, Łukasz Franczyk
Thanks for a reply. 
Unfortunately using CLI to create OAuth connection is not making that Connection appears in List of available connections in Illuminated Cloud 2. The first 3 photos in first post shows that. :( 
Also create OAuth Connection from Illuminated Cloud List Connections is bugged and is not creating proper connection which fourth image shows.


Thanks!

Scott Wells

unread,
Mar 30, 2023, 9:39:57 AM3/30/23
to Illuminated Cloud General Discussion, lukaszfr...@gmail.com, Scott Wells
I'm not aware of any such issue. My guess is that whatever is going on is environmental, but let's see. Please do the following:
  1. Make sure that both the JetBrains IDE and the IC2 plugin are 100% up-to-date.
  2. Completely reinstall the Salesforce CLI. I can't tell you how many issues I've seen (personally and from IC2 users) from stale or wedged CLI installs that may even report as being up-to-date, but a full uninstall/resinstall of the CLI resolves them.
  3. If the problem still exists after doing all the above, please enable debug logging for Salesforce DX and reproduce both issues, the one where IC2 fails to create an OAuth connection and the one where refreshing the org list fails to pick up all valid CLI connections. Then send me the resulting idea.log file for review.
Regards,
Scott Wells


Angel Doshev

unread,
Sep 23, 2024, 11:59:02 AM9/23/24
to Illuminated Cloud General Discussion, Scott Wells, lukaszfr...@gmail.com
Hello,
I guess I am a bit late to this conversation topic but was there a solution to this? I am facing the same problem. I have an existing scratch org that I want to authorize so that it can appear in my list of connections. The authorization part seems to be successful but the org never appears in the list.

All the best,
Angel Doshev

Scott Wells

unread,
Sep 23, 2024, 12:02:04 PM9/23/24
to Illuminated Cloud General Discussion, Angel Doshev, Scott Wells, lukaszfr...@gmail.com
Hi, Angel. I'm not aware of any issues at present with Salesforce CLI-managed connections. The first thing I'd generally recommend would be a scorched earth uninstall/reinstall of your Salesforce CLI as a huge percentage of one-off issues (hopefully like this one) are resolved by doing so.

If after doing that you're still seeing this same behavior, let me know and we'll get some diagnostic logs.

Regards,
Scott Wells

Angel Doshev

unread,
Sep 23, 2024, 12:15:24 PM9/23/24
to Illuminated Cloud General Discussion, Scott Wells, Angel Doshev, lukaszfr...@gmail.com
Wow, that was a lightning fast response! I already did that. I am giving you a little bit more context: I am on macOS and my salesforce CLI is managed through npm. Today I uninstalled everything salesforce related, updated node to the latest stable LTS, and then reinstalled the CLI. However, i am still experiencing the same issue.

All the best,
Angel

Scott Wells

unread,
Sep 23, 2024, 12:18:34 PM9/23/24
to Illuminated Cloud General Discussion, Angel Doshev, Scott Wells, lukaszfr...@gmail.com

Just to be clear, when you say that you already uninstalled, did you follow the steps in the uninstall guide to remove all of the cache directories and such, specifically this kind of stuff?

sudo rm -rf /usr/local/sfdx sudo rm -rf /usr/local/lib/sfdx sudo rm -rf /usr/local/bin/sfdx sudo rm -rf ~/.local/share/sfdx ~/.config/sfdx ~/.cache/sfdx sudo rm -rf ~/Library/Caches/sfdx sudo rm -rf /usr/local/sf sudo rm -rf /usr/local/bin/sf sudo rm -rf ~/.local/share/sf ~/.config/sf ~/.cache/sf sudo rm -rf ~/Library/Caches/sf

If you didn’t, you’re likely going to continue to see any issues from the previous install even if you did the other uninstall/reinstall steps.

If that’s in fact that case, please enable debug logging for Salesforce DX, reproduce the behavior, and send the resulting idea.log file to me for review.

Regards,
Scott Wells

Reply all
Reply to author
Forward
0 new messages