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:

  1. A package.xml file is built with a list of 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 built. This file contains the package.xml and the files of the components that were retrieved.
  4. The files with the components that were retrieved are deployed to the destination organization.
The error above is 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. But why is the component included in the package.xml and not in the zipped directory?

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.


How did we do?