When the “This org does not have source tracking.” error occurs in VS Code

“This org does not have source tracking.” error

In VS Code, when I executed the “SFDX: Retrieve This Source from Org” command to get the source by right-clicking on package.xml, I got the “This org does not have source tracking.” error.

Error message: Retrieve This Source from Org failed to run
“This org does not have source tracking.” is shown in the OUTPUT.

A quick Google search reveals that the latest Salesforce CLI Integration may not be compatible with the latest VS Code Extension, according to the following article.
https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54V00007T4P8wSAF

The CLI was updated one day ago, and my environment has also been updated.

Come to think of it, there was a time when VS Code updated and caused a different error, which was resolved by upgrading the CLI. At that time, the CLI version was quite old.

Workaround 1: Downgrade CLI

Downgrading the Salesforce CLI Integration successfully resolved the error. Below are the steps to downgrade the Salesforce CLI Integration.
Click the Extension icon in the left toolbar, type “CLI” in the search bar, and locate “Salesforce CLI Integration”.

Click the settings icon for “Salesforce CLI Integration” and select “Install Specific Version”.

A list of versions is displayed. Since there were no errors until a few days ago, I selected the previous version, 64.10.1.

Click “Restart Extensions”. Don’t forget.

The version has been downgraded from 64.11.1 to 64.10.1.

By running “SFDX: Retrieve This Source from Org” again, I was able to successfully retrieve the source.

Workaround 2: Disable “Enable Source Tracking For Deploy And Retrieve”

For organizations where Source Tracking is disabled, this feature is unnecessary, so disable it in VS Code.
Reference: Enable Source Tracking in Sandboxes

From the menu bar, select File > Preferences > Settings.

Enter “source tracking” in the search box and uncheck “Enable Source Tracking For Deploy And Retrieve”.

After checking off, I successfully retrieved the source by executing “SFDX: Retrieve This Source from Org”.

コメント

Copied title and URL