Argo CD shows ComparisonError because the app path is not in the repo
Fix it fast
Most common cause, 1 of 3The folder is not in the commit that targetRevision resolves to
Point the Application at a path and revision where the folder really exists.
spec:
source:
repoURL: https://github.com/my-org/gitops.git
targetRevision: main
path: apps/my-appShort answer
Argo CD shows app path does not exist when the repo-server joins spec.source.path to its clone at targetRevision and finds no folder there. Fix the folder name or the branch, replace Windows backslashes such as bootstrap\argo-cd with forward slashes (old argocd-autopilot builds on Windows wrote them), then hard refresh so the cached error clears. Applies to Argo CD 3.6.
Which cause do you have?
Print the path and revision Argo CD uses, then ask Git whether that folder exists at exactly that revision. Empty output from ls-tree means the folder is not there.
argocd app get my-app -o yaml | grep -E 'path:|targetRevision:'
git fetch origin
git ls-tree -d origin/main -- apps/my-appThen find the line you see in this list and open its fix:
- 1The folder is not in the commit that targetRevision resolves to
git ls-tree prints nothing for that revision, but the folder exists on another branch or under a slightly different name - 2The path was written with Windows backslashes
The error shows a backslash, for example bootstrap\argo-cd, while the folder in Git is bootstrap/argo-cd - 3The repo is fixed, but Argo CD keeps serving the cached failure
The message starts with Manifest generation error (cached) even though ls-tree now finds the folder
What does the error look like?
ComparisonErrorManifest generation error (cached): bootstrap\argo-cd: app path does not exist<path>: app path does not exist
Cause 1 of 3
The folder is not in the commit that targetRevision resolves to
You seegit ls-tree prints nothing for that revision, but the folder exists on another branch or under a slightly different name
Check
The repo-server builds the app path by joining spec.source.path to the checked-out repo, and returns app path does not exist when nothing is found there. A typo, a different letter case, a leading folder you forgot, or a folder that only lives on a feature branch all end the same way.
git ls-tree -d --name-only origin/main -- apps/Fix
Point the Application at a path and revision where the folder really exists. Either correct spec.source.path, or set targetRevision to the branch, tag or commit that contains it, then push.
spec:
source:
repoURL: https://github.com/my-org/gitops.git
targetRevision: main
path: apps/my-appVerify
ls-tree now lists the folder, and after the next refresh the Application no longer carries the ComparisonError condition.
git ls-tree -d origin/main -- apps/my-appConfirmed by raw.githubusercontent.com
Cause 2 of 3
The path was written with Windows backslashes
You seeThe error shows a backslash, for example bootstrap\argo-cd, while the folder in Git is bootstrap/argo-cd
Check
The error repeats the path exactly as the Application gives it, backslash included, so the repo-server went looking for one folder literally called bootstrap\argo-cd and never reached bootstrap/argo-cd. The argocd-autopilot 0.4.11 release notes list a fix for bootstrapping on Windows. In issue 454 the reporter traced the bad path to a Chocolatey copy of the tool that was much older than the latest release.
grep -rn 'path:' bootstrap/*.yamlFix
Change every backslash in spec.source.path to a forward slash and push. Then replace the old autopilot binary with a current release from the project's release page and check its version.
# bootstrap/argo-cd.yaml
spec:
source:
path: bootstrap/argo-cd
argocd-autopilot versionVerify
The argo-cd Application loses its ComparisonError after the next refresh, and argocd-autopilot version reports 0.4.11 or later.
argocd app get argo-cd --refreshConfirmed by github.com
Cause 3 of 3
The repo is fixed, but Argo CD keeps serving the cached failure
You seeThe message starts with Manifest generation error (cached) even though ls-tree now finds the folder
Check
After repeated generation failures the repo-server saves the last error and hands it back with the (cached) prefix until a set time or number of requests has passed. Its repo cache, manifest results included, expires after 24 hours by default, and a resolved revision is kept for 3 minutes, so a plain refresh right after your push can still get the stored error.
argocd app get my-appFix
Run a hard refresh. It reloads the application data and also drops the target manifests cache, so the repo-server generates the manifests again from Git.
argocd app get my-app --hard-refreshVerify
The cached prefix and the ComparisonError are gone, and the app shows a real sync status.
argocd app get my-app -o wideConfirmed by argo-cd.readthedocs.io
How do I stop it coming back?
- Add a CI step that runs git ls-tree for every spec.source.path in your Application manifests and fails the pull request when one is missing.
- Install argocd-autopilot from its GitHub release page and print its version in setup docs, so an outdated packaged binary is spotted.
- Rename or move an app folder in the same commit that updates the Application pointing at it.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.