Deploy fails for Custom Fields on packaged objects: "Must specify a non-empty label for the CustomObject"
See original GitHub issueSummary
Custom Fields on objects that reside in packages (both managed & unmanaged/unlocked) fail to deploy, requiring an object-meta.xml file that already exists in the package.
A “workaround” is to have the full object-meta.xml file in two places, which is not very acceptable for an org-based development pattern. Or any, for that matter.
Steps To Reproduce:
I’m sorry but I don’t know if I have the ability to create an easy reproduction. I think that would require creating an unlocked package & then unpackaged source… This is most certainly a confirmed issue though.
- Have a package that has an object CustomObject__c in it (i.e. the source of truth for CustomObject__c.object-meta.xml)
- Using
sfdx force:source:deployto try to deploy CustomObject__c.CustomField__c
Expected result
Deploys successfully
Actual result
Get the error: “Get “Error:Must specify a non-empty label for the CustomObject””
System Information
{
"cliVersion": "sfdx-cli/7.118.1",
"architecture": "win32-x64",
"nodeVersion": "node-v14.17.4",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.3 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.4.0-3 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/sfdx-diff 0.0.6",
"alias 1.1.10 (core)",
"auth 1.7.1 (core)",
"config 1.2.34 (core)",
"generator 1.2.0 (core)",
"mo-dx-plugin 0.3.2",
"plugin-lightning-testing-service 1.0.1",
"salesforcedx 52.0.0",
"├─ data 0.4.11",
"├─ apex 0.2.2",
"├─ custom-metadata 1.0.12",
"├─ user 1.3.0",
"├─ org 1.6.6",
"├─ schema 1.0.7",
"├─ templates 51.5.0",
"├─ limits 1.2.1",
"├─ @salesforce/sfdx-plugin-lwc-test 0.1.7",
"└─ salesforce-alm 52.0.0",
"sfdx-cli 7.118.1 (core)",
"sfdx-git-delta 4.9.0",
"sfdx-git-packager 0.3.3",
"sfdx-isdot 2.6.3 (link) C:\\Users\\jpetraglia\\repos\\isdot",
"sfdx-jayree 3.11.2",
"└─ @jayree/sfdx-plugin-prettier 1.0.4",
"source 1.0.15 (core)",
"telemetry 1.2.3 (core)",
"texei-sfdx-plugin 1.10.1",
"trust 1.0.7 (core)"
],
"osVersion": "Windows_NT 10.0.17134"
}
Additional information
Issue Analytics
- State:
- Created 2 years ago
- Comments:32 (11 by maintainers)
Top Results From Across the Web
Must Specify a Non Empty Label for the Custom Object
This error occurs when the Object's label tag is missing in the promotion branch. Below you will find a possible scenario where this...
Read more >Error:Must specify a non-empty label for the CustomObject
Summary "Must specify a non-empty label for the CustomObject" when deploying a custom field to the target org using Org development model.
Read more >How to push fields on packaged objects with SFDX?
For custom objects, this works fine as stated, no <NAMESPACED-OBJECT>.object-meta.xml files generated for them. I found it still being generated ...
Read more >SFDX: Deploy metadata option on source folders - Bitbucket
ForceComSfdxMetadataDeployer - Found ERROR for CustomObject objects/Action__mdt/Action__mdt.object-meta.xml: Must specify a non-empty label ...
Read more >Why can't I find specific metadata in my Gearset comparison ...
In a custom filter, you can either select All managed packages, or Choose ... retrieve a particular custom field, you need to specify...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yeah, that library powers
plugin-sourceand the newsource:beta:*commands likesource:beta:pushand the rest that weren’t initially inplugin-source. Eventually that library will be behind all of thesource:*andmdapi:*commands 🤘for a timeline… that’s a harder question to answer. I’ll mark it as a bug and get it in our backlog.
We are currently experiencing this issue when trying to push a new custom object with some fields to a scratch org. I’ve tried different versions of the CLI and it’s working fine in 7.122.0, not working in 7.150.0 and 7.162.0.
“Error ACTM_AccountTeamMember__c Must specify a non-empty label for the CustomObject”
I’m however getting the error when running the sfdx force:source:push command. The metadata is in an unlocked package and we’re pushing multiple unlocked packages and unpackaged metadata that resides in different folders in the same push. It was working fine for us on version 7.122 and 7.150 until we introduced this new object.