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?
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:
Could you please provide further assistance to resolve this issue? Thank you.
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?
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
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
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
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