Required field is missing: label (cryptic salesforce error message from ant deploy)

I saw this error message recently, which didn’t make much sense:

BUILD FAILED
build.xml:{line num}: FAILURES:
Error: pages/PageName.page(PageName):Required field is missing: label

This error can happen when attempting to deploy a page that is missing the meta xml file. If you view the meta xml file, you see a structure similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>25.0</apiVersion>
    <label>PageName</label>
</ApexPage>

So it somewhat makes sense, maybe Salesforce was looking for <label>. File this one in the unnecessarily cryptic error messages drawer.

This entry was tagged , , . Bookmark the permalink.

2 Responses to Required field is missing: label (cryptic salesforce error message from ant deploy)

  1. I’m getting this same error when trying to save a VisualForce page from Development Mode, even with valid markup.

  2. Sreenivas says:

    I got the same issue earlier and we find the root cause in my case is extension of file is missing i.e., If you deplying Page the page shouldbe extension with ( .page) and realted meta data file should be with extension (.page-meta.xml).

Comments are closed.