When deploying metadata using Salesforce CLI, you may encounter one or more of the following errors if your UiBundle metadata file contains unsupported or incorrect target values:
Error: Invalid target 'AppLauncher'Error: Invalid target 'CustomApplication'Error: Invalid version and target combinationThese errors occur because the uibundle-meta.xml file specifies target values that are either unsupported for the current API version or are incorrectly formatted.
This issue applies to Lightning Web Components (LWC) and Aura component bundles deployed via sf deploy metadata or sfdx force:source:deploy commands in Salesforce CLI.
These errors most commonly appear when:
targets section of the uibundle-meta.xml file.262.8 core app + b2e access feature enabled + outdated sfdx plugins
If customer see the following error:
Invalid Target value 'AppLauncher'. Valid values are: [CustomApplication, Experience]. Note: 'AppLauncher' has been deprecated in favor of 'CustomApplication'.
This means the customer’s org has the b2e access feature enabled, and they are trying to deploy the old metadata shape of UiBundle, the UiBundle could be something customer already has in their vs code, or it could be generated by the old version of skills/templates/reference apps.
To workaround this, customer should follow the following steps:
In <project root folder>/force-app/main/default/uiBundles/<UiBundle devname>/<UiBundle devName>.uibundle-meta.xml, update AppLauncher target to be CustomApplication
In <project root folder>/force-app/main/default/applications folder, create an xml file for CustomApplication
Sample file name: TestApp.app-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<brand>
<headerColor>#0070D2</headerColor>
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
</brand>
<formFactors>Small</formFactors>
<formFactors>Large</formFactors>
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
<label>TestApp</label>
<navType>Standard</navType>
<uiBundle>c__propertymanagementapp</uiBundle>
<uiType>Lightning</uiType>
</CustomApplication>
The uiBundle field should be in the format of <namespace>__<devName of the uiBundle>, for an org without namespace, <namespace> should be c.
262.8 core app + b2e access feature disabled + latest sfdx plugins
If customer see the following error:
The specified field isn't valid: uiBundle. And Invalid Target value 'CustomApplication'. Valid values are: [AppLauncher, Experience].
This means the customer’s org has been upgraded to 262.8 but the b2e feature is disabled, and they are trying to deploy the latest metadata shape which is only applicable when b2e feature is enabled, most likely generated through the latest version of skill/template/reference apps.
To workaround this, customer should follow the following steps:
Update CustomApplication target to AppLauncher
In <project root folder>/force-app/main/default/applications folder, delete the xml file that has the <uiBundle> field.
Refer to the xml sample in Error 1.
260 core app + latest sfdx plugin (no b2e access feature on 260)
Customer will hit several errors:
1. Invalid version specified:67.0
This means the customer’s org is still on 260 (v66), and the project they are trying to deploy is created with v67.
To workaround this, customer need to update <project root folder>/sfdx-project.json file and set sourceApiVersion as "66.0"
Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}uiBundle invalid at this location in type CustomApplication (15:15) and Invalid Target value 'CustomApplication'. Valid values are: [Experience, AppLauncher]
To workaround these errors, follow workaround for Error 2
005385935

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.