Deployment error: was named in package xml but was not found in zipped directoryWhen deploying a Git promotion step you may encounter the error below for one or several components: "ComponentName of type ComponentType was named in package.xml, but was not found in zipped directory."
The process when deploying with the Metadata API in general is the following:
1. A package.xml file is build with the components that are going to be deployed.
2. The components included in the package.xml file are retrieved from the source organization.
3. A zip file is build. This file contains the package.xml and the files for the components that were retrieved.
4. The files with the components that were retrieved are deployed to the target organization. The error above will be displayed when a component that was included in the package.xml file to be retrieved and deployed is not found in the files to be deployed.
Why is the component included in the package.xml but not in the zipped directory?
If the component is in the package.xml file, it should have been retrieved and a file with the component should have been created in the zip file so that the component can be deployed.
Possible causes are:
- The component was deleted at some point in the source org during the process what made the component to be included in the package.xml file but it was never retrieved.
- The component could have been renamed at some point during the process what made the component to be included in the package.xml file with a name that doesn't match any component in the org and therefore but it couldn't be retrieved.
Now, back to Copado, the process when deploying a Git Promotion step is the same.
The package.xml with the components will be created from the selections in the deployment. The files in the zipped directory will be created from the data in the .xml files in the Promotion Branch in Git.
If you are getting that error when deploying please check that the component returning the error exist in the Promotion Branch in Git since we are creating the files that are deployed from the Promotion Branch. You might have the component included in the deployment selections in the Git Promotion step but the component doesn't exist in the Promotion Branch created for that deployment.
Why the component you are trying to deploy doesn't exist in the Promotion Branch although it's selected in the deployment step?
1. Check if the component exists in the source org. If it doesn't exist, that is the cause of the problem.
2. If the component exists in the source org, was it committed to the feature branch?
3. If it was committed to the feature branch, was it merged into the promotion branch?
4. If you can see that the component was merged into the promotion branch but it does not longer exist, it could been removed manually.
If the information above doesn't help you to solve the issue, please contact us at firstname.lastname@example.org providing us with all the information so that we can reproduce the same scenario.