Skip to main content

Resolving validation errors - "We couldn't retrieve the design time component information for component <xxx>" on FlexiPage metadata type

Why a Lightning page (FlexiPage) fails validation when a component on it is missing from the target org, and how to fix it.

Written by Mateusz Kochanowicz

Salesforce returns this error when a Lightning page you're deploying uses a component that Salesforce can't find, or can't use, in the target org.

Error overview

You may run into this Salesforce validation error when deploying a Lightning page (FlexiPage metadata type) with Compare and deploy, or when a pull request (PR) is validated in Gearset Pipelines.

In Gearset the error message would be reported as below:

We couldn't retrieve the design time component information for component <xxx>.


Here, <xxx> is the component on the page, written as namespace:componentName. For example: c:myCustomComponent.

Which metadata types report this error?

In every case reported to us, Salesforce reported this error on the FlexiPage (Lightning page) metadata type. We've seen it on both Lightning record pages and Lightning app pages.

The Lightning page doesn't always come from your own selection. We've seen the error in these deployments:

  • A Lightning page deployed on its own, or with only one section of the page selected.

  • A new Custom object and its fields, where a Problem Analyzer added the object's Lightning record page to the package.

  • A Lightning page deployed together with the Lightning web components or Aura components it uses.

  • A Lightning page deployed together with an OmniStudio FlexCard.

Explanation of the error

Every component placed on a Lightning page is stored in the page's XML in a <componentName> element, in the format namespace:componentName.

Example:

<componentInstance>
<componentName>c:myCustomComponent</componentName>
<identifier>c_myCustomComponent</identifier>
</componentInstance>

When you deploy the page, Salesforce checks that each of these components exists in the target org, and reads its design time information. This is the configuration the Lightning App Builder uses to display the component on a page. If Salesforce can't find the component, it fails the whole Lightning page with this error.

Note: Gearset validates the whole Lightning page, even if you selected only part of it in the comparison. A component anywhere on the page can cause this error, not just the one you changed.

What does the namespace in the error tell you?

The following table shows what the namespace prefix in this error usually points to, based on the cases reported to us.

Namespace in the error

Example

What it usually means

c:

c:myCustomComponent

A custom Lightning web component or Aura component built in your org. It's missing from the target org and from the deployment package.

A managed package namespace

package_name:componentName

A component from a managed package that isn't installed in the target org.

A Salesforce-provided namespace

lst:dynamicRelatedList

A standard Salesforce component that isn't available in the target org yet, for example because the org is on an earlier Salesforce release.

Why does this happen?

In the cases reported to us, the error happened when:

  • The component doesn't exist in the target org, and it isn't included in the deployment package. This is the most common cause.

  • The component's metadata type isn't included in the metadata filter of your comparison or the CI job.

    Note: If the metadata filter of your comparison or CI job doesn't include the component's metadata type, Gearset can't add the component to the package, even if it's committed to your feature branch.

  • The component is in the deployment package, but something it depends on, such as its Apex controller or a Custom field, is missing from the target org.

    • In this case, the dependent component must be deployed to the target org first.

  • The component belongs to a managed package that isn't installed in the target org.

    • In this case, the managed package the component belongs to must be installed in the target org first.

  • The component is a Salesforce-provided component that the target org's Salesforce release doesn't support yet.

Why is a Lightning page in my deployment when I didn't select one?

When you deploy a new Custom object, Gearset may use a Problem Analyzer called Items that are missing in the target.

This Problem Analyzer can add the object's Lightning record page to your deployment package. On CI job deployments, this is executed automatically.

This happens because the object references that page, and the page doesn't exist in the target org yet. Salesforce then validates the Lightning page and every component on it, which is where this error comes from.

Resolution

Below we're explaining how to find the component named in the error, and how to resolve the error depending on its cause and how you're making a deployment in Gearset.

Find the component and check the target org

  1. Copy the component name from the error message.

  2. Open the comparison for your failed validation and select the Lightning page (FlexiPage) named in the error.

  3. Switch to the XML view and search for the component name, to see where the page uses it.

  4. Check the namespace prefix. A c: prefix points to a custom component in your org, and any other prefix points to a managed package or a Salesforce-provided component.

  5. Check whether the component exists in the target org. If it doesn't, follow the workaround below that matches the namespace.

Workaround 1: Include the missing component in the deployment

Use this workaround when the namespace is c: and the component exists in your source org or branch, but not in the target org.

For deployments made via Compare and deploy (org to org, or Git to org)

  1. Make sure your metadata filter includes the Lightning web component and Aura component metadata types. You can add them to a custom filter, or use Gearset's default Compare all metadata filter (check Manage custom filters in Compare and deploy).

  2. Refresh the comparison (for all refresh options available check Refreshing metadata in Compare and deploy).

  3. Find the component named in the error, and select it together with the Lightning page.

  4. Validate the deployment package again.

For Git to org deployments, the component also needs to be in the branch you're deploying from. Use Compare and deploy to commit it from your source org first.

For a PR failing validation in Pipelines

  1. Check the metadata filter of the CI job for the target environment. Make sure it includes the Lightning web component and Aura component metadata types. If the filter only includes specific named components, add the one named in the error.

  2. Make sure the component is committed to the feature branch your PR was created from. In Pipelines, select the Developer Sandbox the feature was created from, then select Commit more changes... button.

  3. Re-validate the PR.

Workaround 2: Deploy the component and its dependencies first, then the Lightning page

Use this workaround when the component is already in your deployment package and the error persists, or when you get new errors about the component's own dependencies.

  1. Deploy the component's dependencies first, such as its Apex controller and any Custom objects or fields it uses.

  2. Deploy the Lightning web component or Aura component.

  3. Deploy the Lightning page.

In Gearset Pipelines, you can promote the component and its dependencies in a separate PR first. Once they're in the target org, re-validate the PR that contains the Lightning page.

Salesforce describes the same approach, components first and the Lightning page second, for package installs in its Known Issue article:

Workaround 3: Install the managed package in the target org

Use this workaround when the namespace in the error belongs to a managed package.

  1. In the target org, go to Setup > Installed Packages and check that the package is installed, in the same version as in your source org.

  2. If it isn't installed, install it in the target org from AppExchange or the vendor's install link.

  3. Re-run the validation in Gearset.

Avoid adding the package's own components to the deployment instead. Salesforce rejects them with the error: Cannot create a new component with the namespace: <namespace>.

Workaround 4: Check that the target org supports a Salesforce-provided component

Use this workaround when the namespace belongs to a Salesforce-provided component, such as lst:dynamicRelatedList.

Check that the target org is on a Salesforce release that includes the component. In one case reported to us, the component was only available from the Summer '22 release (API v55), and the target org didn't have it yet. Deploy the Lightning page once the target org is on a release that includes the component.

If a Problem Analyzer added the Lightning page to your deployment

If you're deploying a new Custom object and the Problem Analyzer Items that are missing in the target added its Lightning page, you have two options:

  • If you want the Lightning page in this release, include the missing component, as described in Workaround 1.

  • If you don't need the Lightning page yet, untick the Problem Analyzer's suggestion for the page before you validate.

Note: If the Custom object has an action override that points to the Lightning page (for example on the View action), unticking the page makes Salesforce fail the object with a validation error: <xxx> does not exist or is not a valid override for action View.

In that case, either deploy the page together with its missing component, or follow the guidance in our documentation on how to resolve validation error: <xxx> does not exist or is not a valid override for action <yyy>.

If the component is already in the target org and in your package

Re-run the validation in Gearset once more before changing anything else. In one case reported to us, the error cleared on the next validation run with no changes to the package.

Disclaimer: This error is returned directly by Salesforce, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?