As title says, a deploy via Ant is failing when trying to deploy a path on opportunity. After searching, I found a few posts on the Salesforce forums back from 2017 related to this issue, but nothing with a resolution. I am opening a case with Salesforce concurrently, but wanted to see if anyone has encountered this while deploying a path, and if so, if there's a resolution.
3 Answers
The short answer provided by Salesforce - you have to deploy the path file on its own.
After a lot of unsuccessful troubleshooting with support, the resolution provided by Salesforce was to run two deploys - the first with all components except the path file, then the second with the pathAssistant file being the only metadata component in the deploy, on its own. This successfully deployed the path, but trying to run a single, complete deploy with the path included afterwards resulted in the same error, effectively preventing it from being included in our continuous integration.
We decided to omit it from our version control/CI altogether based on the above.
In my particular case, my repository had http and my org had https in the formula. I updated my repo to match the org and it works fine for now. We'll see if it still works if anyone ever updates that path.
Make sure you only have the path specified once in your package.xml.
I encountered the issue when merging several package.xml files - when I removed any duplicate pathAssistant mentions this problem resolved itself.