Deployment Error: 'ComponentName of type ComponentType was named in package.xml, but was not found in zipped directory'
When 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.’ In order to understand where this error comes from, let's take a look at how the process of deploying with the Metadata API works.
The general process of deploying with the Metadata API is the following:
- A package.xml file is built with a list of the components that are going to be deployed.
- The components included in the package.xml file are retrieved from the source organization.
- A zip file is built. This file contains the package.xml and the files of the components that were retrieved.
- The files with the components that were retrieved are deployed to the destination organization.
If the component is in the package.xml file, this component should have been retrieved and a file with the component should have been created in the zip file so that the component could be deployed.
In Copado, the process of deploying a Git Promotion step is the same as described above. The package.xml with the components is created from the selections in the deployment, which are usually the components committed in the user stories, and the files in the zipped directory are created from the data in the .xml files in the promotion branch in Git.
If you are getting this error when deploying, make sure the component returning the error exists in the promotion branch in Git, since we are creating the files that are deployed out of promotion branch. You might see the components included in the deployment selections in the Git Promotion step, but the components may not exist in the promotion branch created for that deployment.
If the component doesn't exist in the promotion branch for that deployment, that explains the error you are getting. You can follow the article below to figure out the reason why the component doesn't exist in the promotion branch.
How to troubleshoot an incorrect Deployment
If the information in the article doesn't help you solve the issue, please log a case on the Success Community at https://success.copa.do and provide us with all the relevant information.