CustomTab was named in package.xml but was not found in zipped directory

When deploying with Copado, you might get the error below for standard tabs:

[ standard-objectName] An object 'standard-objectName' of type CustomTab was named in package.xml, but was not found in zipped directory

This will happen if your deployment includes standard tabs like the ones below:

standard-Account
standard-Case
standard-Chatter
standard-Contact
standard-Document
standard-Idea
standard-Lead
standard-Macro
standard-Opportunity
standard-OtherUserProfile
standard-Product2
standard-ProfileSkill
standard-Quote
standard-Recognition
standard-Solution
standard-home
standard-report

Depending on the features you are using in your org, there might be more standard tabs available.

The reason why that error is returned in the deployment is the following. Standard tabs are not retrievable by the Metadata API. When a standard tab is committed on a user story, the tab is not created in git. Even though the tab is not created in git, if the commit is successful because some other components were committed at the same time, the tab will be part of your user story and deployment record and we will try to deploy it. This will cause the error above since the tab doesn't exist in git (feature branch and promotion branch) and we can provide Salesforce with it for the deployment. However the tab is listed on your deployment what means it will be part of the package.xml file used in that deployment. 

The fact that standard tabs cannot be retrieved with the Metadata API can be tested easily following these steps:

1. Log into workbench from: https://workbench.developerforce.com/login.php
2. Use this package.xml to retrieve the tab from the org. Do not forget to select the checkbox Single Package when retrieving.

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>standard-Account</members>
<name>CustomTab</name>
</types>
<version>48.0</version>
</Package>

3. Retrieve the tab.
4. Check the results. You will something like this:

User-added image

How did we do?