Error Occurred While Retrieving Source in SFDX Project on Windows 11 with Illuminated Cloud

59 views
Skip to first unread message

akippiko

unread,
Dec 25, 2024, 12:21:45 AM12/25/24
to Illuminated Cloud Q&A

I encountered an error while attempting to create an SFDX project and retrieve the source using Illuminated Cloud on a Windows 11 environment. The attached image shows the details of the error. Could you please assist in resolving this issue?



SalesforceError.png

akippiko

unread,
Dec 25, 2024, 3:18:41 AM12/25/24
to Illuminated Cloud Q&A, akippiko

When attempting to create an SFDX project and retrieve metadata for the first time, the same error I previously reported consistently occurs under the following environment setup:

  • Operating System: Windows 11
  • IDE: IntelliJ IDEA 2023.1.7 (Ultimate Edition)
  • Plugin: Illuminated Cloud 2.3.0.4

Could you please provide further assistance to resolve this issue? Thank you.


2024年12月25日水曜日 14:21:45 UTC+9 akippiko:

akippiko

unread,
Dec 25, 2024, 4:18:54 AM12/25/24
to Illuminated Cloud Q&A, akippiko
I have identified a workaround for the issue I reported earlier regarding metadata retrieval failure in an SFDX project with Illuminated Cloud. Here's what worked for me:

I created the SFDX project and retrieved the metadata using Salesforce CLI instead of Illuminated Cloud.
After retrieving the metadata, I opened the project in IntelliJ IDEA with Illuminated Cloud installed.
Finally, I established the connection using the OAuth-based connection, which resolved the problem, allowing me to proceed without any errors.
I wanted to share this workaround for your reference and to inquire if this is the recommended approach or if there is a more direct solution to this issue.

Thank you for your assistance!

2024年12月25日水曜日 17:18:41 UTC+9 akippiko:

akippiko

unread,
Dec 26, 2024, 3:14:24 AM12/26/24
to Illuminated Cloud Q&A, akippiko

This workaround does not seem to work either.

I can't do my job if I can't create projects well enough.
2024年12月25日水曜日 18:18:54 UTC+9 akippiko:

akippiko

unread,
Dec 26, 2024, 4:20:09 AM12/26/24
to Illuminated Cloud Q&A, akippiko

I tried installing sf cli 2.64.8, and I was able to retrieve metadata.

I referred to the following: https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D5KX000000P4ax0AC

Until now, I had been installing sf cli from the exe available at the current time, but using the exe always installs the latest version. So, I installed version 2.64.8 using npm, then checked the installation location using where sf. After specifying that installation location in the SF project's settings, I was able to retrieve metadata.

Could the issue have been the version of sf cli?
But if that’s the case, even with the latest version that throws errors, I was able to retrieve metadata directly using the command prompt with sf project retrieve start ... instead of through Illuminated Cloud.
So maybe it’s an issue with the compatibility between the latest version and Illuminated Cloud?

2024年12月26日木曜日 17:14:24 UTC+9 akippiko:

Scott

unread,
Dec 26, 2024, 10:08:11 AM12/26/24
to Illuminated Cloud Q&A, akip...@gmail.com
There can be several potential problems with the installed Salesforce CLI that can lead to such issues. The first, of course, is having an older version of the CLI installed that doesn't support the commands issued by Illuminated Cloud. The second -- and unfortunately more common -- is having a corrupted Salesforce CLI install, most often due to repeated in-place updates. My guess is that's what was going on here as I see it happen with some frequency.

The best way to solve both problems is a full uninstall/reinstall of the Salesforce CLI using these uninstall instructions:


It's critical that the listed cache directories also be removed in the process.

I also recommend that all software be kept up-to-date for the best experience and support including the JetBrains IDE, the Illuminated Cloud 2 plugin, and the Salesforce CLI (which is currently 2.70.7, so still a bit newer than what you've installed).

Otherwise there should be a problem using the CLI via a packaged installer or NPM. I have a mix across my own test machines.

Regards,
Scott Wells

Scott

unread,
Dec 26, 2024, 7:12:26 PM12/26/24
to Illuminated Cloud Q&A, Scott, akip...@gmail.com

Regarding the following:

Thank you for the detailed response.

I have already performed a full uninstall and reinstall of the Salesforce CLI, including clearing the cache directories, but unfortunately, this did not resolve the issue. Based on my experience, I do not currently believe the problem lies with the reinstallation process.

At this point, I feel that using Salesforce CLI version 2.64.8 installed via npm is the most viable solution. This version appears to be stable and compatible with the commands issued by Illuminated Cloud in my environment.

Please let me know if you have any further insights or alternative suggestions.

Looking at the original error, it’s failing with:

Warning: force source retrieve is not a sf command

Illuminated Cloud has not run those older commands for a very long time. I should have noticed this earlier, but it does look like you have a very old version of the plugin installed.

As I mentioned in my previous reply, please make sure that all software is up-to-date including the JetBrains IDE (latest is 2024.3.1.1), the Illuminated Cloud plugin (latest is 2.3.4.1), and the Salesforce CLI (latest is 2.70.7). If you are confident that everything is 100% up-to-date and you’re still seeing this issue, please enable debug logging for Salesforce DX and Metadata Retrieval, reproduce the issue, and email the resulting idea.log file for review.

Regards,
Scott Wells

Scott

unread,
Dec 26, 2024, 7:52:37 PM12/26/24
to Illuminated Cloud Q&A, Scott, akip...@gmail.com

Responding to:

IntelliJ is not the latest version; I am using 2023.1.7. Could this be causing the problem? This is a perpetual license, and I do not have a license for upgrading to the latest version. As for Illuminated Cloud, I am using version 2.3.0.4.

That explains it. That version of IC2 was released at the end of March, 2024. There have been almost weekly releases since then containing a significant cumulatve set of changes:

https://illuminatedcloud.blogspot.com/

I make a policy of maintaining backward-compatibility with one full year’s worth of JetBrains IDE releases, so currently 2024.1-2024.3. Sometimes I’ll include one additional minor release, e.g., I only recently dropped support for 2023.3. Unfortunately it’s prohibitive to maintain backward-comaptibility with more than that because of breaking changes in the JetBrains plugin SDK as well as new features that I integrate into IC2.

I would strongly recommend updating to a newer JetBrains IDE. Otherwise you’re going to be stuck on both increasingly older versions of IC2 and, because of the change to the newer CLI command syntax from the deprecated-now-removed older command syntax, older unsupported versions of the Salesforce CLI.

Note that I’ve recently integrated LSP4IJ into IC2, significantly improving the main gap between JetBrains free and commercial IDEs, JavaScript(/TypeScript) and CSS support:

https://illuminatedcloud.blogspot.com/2024/12/2339-release-notes.html

I would recommend that you install the latest version of IntelliJ IDEA Community Edition along with the latest versions of IC2 and the Salesforce CLI, or if you’d prefer, upgrade your exising IntelliJ IDEA Ultimate Edition to the latest.

Regards,
Scott Wells

Scott

unread,
Dec 26, 2024, 9:10:19 PM12/26/24
to Illuminated Cloud Q&A, Scott, akip...@gmail.com

Responding to:

I fully understand the importance of keeping everything up to date. However, in this case, the proposed solution is to completely remove the older versions and update to the latest versions. Is that really the correct approach?

I guess a different way to put it is that if you’re fine staying on those older versions, that’s certainly an available option. However, if you need support for IC2 — at least for anything that requires a change — I do require you to be on the most recent version, and Salesforce no longer supports those older CLI commands and will also require you to update the CLI to the latest-and-greatest if/when you might need CLI-related support in the future. So if you stay on those older versions, you’ll be very limited in the available support options.

The reason for my question is that, while using IntelliJ 2023.1.7, IC 2.3.0.4, and the latest Salesforce CLI, I was unable to retrieve metadata. However, with IntelliJ 2023.1.7, IC 2.3.0.4, and Salesforce CLI version 2.64.8, metadata retrieval worked.

The reason that things stopped working is that the CLI recently dropped support for the force:* commands:

https://github.com/forcedotcom/cli/blob/main/releasenotes/README.md#2658-november-6-2024

This suggests that the key factor here is the version of the Salesforce CLI. That said, since metadata retrieval works directly via the command line with both versions of the Salesforce CLI, isn’t it more likely that this is an issue of compatibility between the Salesforce CLI version and IC 2.3.0.4?

No, not really. IC must always support the latest version of the Salesforce CLI, and so it switched over to the newer CLI command syntax back in April, 2024:

https://illuminatedcloud.blogspot.com/2024/04/2306-release-notes.html

At this point nothing should really be compatible with those older CLI commands as they’re not even included in CLI any longer. As a result, while you can stay on older, unsupported software, I do strongly recommend that you update to current, supported software.

Hopefully that helps clarify it. Please let me know if not.

Regards,
Scott Wells

Scott

unread,
Dec 26, 2024, 10:53:11 PM12/26/24
to Illuminated Cloud Q&A, Scott, akip...@gmail.com

Responding to:

Ah, perhaps the confusion lies in the fact that the current latest version of IC is 2.3.4.1, and IntelliJ 2023.1.7 cannot be updated to that version. Could it be that this incompatibility is causing the issue?

That’s correct. Please see the following from a few responses earlier in this thread:

I make a policy of maintaining backward-compatibility with one full year’s worth of JetBrains IDE releases, so currently 2024.1-2024.3. Sometimes I’ll include one additional minor release, e.g., I only recently dropped support for 2023.3. Unfortunately it’s prohibitive to maintain backward-comaptibility with more than that because of breaking changes in the JetBrains plugin SDK as well as new features that I integrate into IC2.

2023.1 has not been supported since early April, 2024. In order to upgrade to a current version of Illuminated Cloud, you will need to be using IntelliJ IDEA 2024.1 or later.

Regards,
Scott Wells

Reply all
Reply to author
Forward
0 new messages