-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Note
Before you submit your issue, make sure that:
- You're using the latest version of Salesforce CLI.
- You've searched both open and closed issues for related posts.
- You've used the
doctorcommand to diagnose common issues.- You understand that GitHub Issues don't adhere to any agreement or SLA.
- If you require immediate assistance, use official channels such as Salesforce Customer Support.
Summary
Metadata files that have an ampersand in them don't get properly updated in source tracking, so they are always listed as needing to be deployed or retrieved. They are unable to be forceignored, and after a tracking reset they pop back up as needing to be retrieved. Manually updating the maxRevision JSON with the latest retrieved revision does not work.
Steps To Reproduce
IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.
- Generate a project with
sf project generateor fork dreamhouse-lwc.- Provide detailed step-by-step instructions on how to reproduce the issue.
Tip
use sf doctor --create-issue to automatically fill the required information
This is in a sandbox with source tracking on. We have a layout titled "Legal & Compliance Layout" that has been properly synced to the org, but the local sf cli installation does not agree.
To reproduce:
Have a layout with an & in the filename (most likely with %26 instead of &)
Push to your sandbox
All future retrieves will now include this file even if nothing has changed
Bonus: add the entire layout directory to your .forceignore. You will notice that it will still continually see this one particular layout and pull it as if there was no local file (source tracking believes it will be a create)
Expected result
The layout should only be retrieved if the metadata changed
Actual result
The layout is always retrieved, even after running the reset tracking command or adding the layout directory to your .forceignore file
Additional information
The root cause of this is most likely this line from the sf doctor output:
[16:29:32.682] �[34mDEBUG�[39m (RemoteSourceTrackingService): �[36mSyncing 1 Revisions by key�[39m
[16:29:32.682] �[33mWARN�[39m (RemoteSourceTrackingService): �[36mfound no matching revision for Layout###Legal_Compliance__c-Legal %26 Compliance Layout�[39m
Note the change from & to %26. In the local filesystem, it is %26. In maxRevision.json, it is listed as this:
"Layout__Legal_Compliance__c-Legal & Compliance Layout": {
"memberType": "Layout",
"serverRevisionCounter": 13497,
"lastRetrievedFromServer": null,
"isNameObsolete": false
},
I attempted to manually update lastRetrievedFromServer to be 13497 but that does not fix the issue.
Essentially, lastRetrievedFromServer is never updated because something somewhere is not equating that & and %26 are the same.
System Information
Manually, by the zsh terminal in VSCode - but this also happens when using the Salesforce Extension Pack
{
"architecture": "darwin-arm64",
"cliVersion": "@salesforce/cli/2.122.6",
"nodeVersion": "node-v22.18.0",
"osVersion": "Darwin 25.3.0",
"rootPath": "/usr/local/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.2.40 (core)",
"@oclif/plugin-commands 4.1.40 (core)",
"@oclif/plugin-help 6.2.37 (core)",
"@oclif/plugin-not-found 3.2.74 (core)",
"@oclif/plugin-plugins 5.4.55 (core)",
"@oclif/plugin-search 1.2.37 (core)",
"@oclif/plugin-update 4.7.18 (core)",
"@oclif/plugin-version 2.2.36 (core)",
"@oclif/plugin-warn-if-update-available 3.1.55 (core)",
"@oclif/plugin-which 3.2.43 (core)",
"@salesforce/cli 2.122.6 (core)",
"agent 1.27.3 (core)",
"apex 3.9.5 (core)",
"api 1.3.8 (core)",
"auth 4.1.4 (core)",
"code-analyzer 5.3.0 (user) published 203 days ago (Tue Jul 29 2025) (latest is 5.9.0)",
"data 4.0.67 (core)",
"deploy-retrieve 3.24.7 (core)",
"info 3.4.100 (core)",
"limits 3.3.74 (core)",
"marketplace 1.3.8 (core)",
"org 5.9.64 (core)",
"packaging 2.24.11 (core)",
"schema 3.3.90 (core)",
"settings 2.4.54 (core)",
"sobject 1.4.82 (core)",
"telemetry 3.6.71 (core)",
"templates 56.4.7 (core)",
"trust 3.7.113 (core)",
"user 3.6.48 (core)"
]
}