Error: CustomField Not in package.xml when defining custom field in child managed 2gp from a custom object created in parent managed2gp under the same namespace
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the installation using the parent and child managed 2gp packages described in the steps, including the force-app/main/default/nmsp__O/F__c.xml metadata path. Inspect how the CLI builds or validates package.xml for the child package, then verify that installing the package in an empty scratch org no longer reports O__c.F__c as missing.
Written by the indexing model from the issue text.
Description
Summary
I am not able to install a child managed 2gp version that has a custom field in a custom object from its parent managed 2gp (in the same namespace). Getting Error: CustomField Not in package.xml for that custom field when trying to install the package. Creation of the package (even with validations) does not fail
Steps To Reproduce
IMPORTANT
1-Create a parent 2gp managed package A under namespace nmsp, and create a custom object O. Create a new beta version for this package
2-Create a child 2gp managed package B. Create dependency between package A and B (we are using cumulusCI), and create in custom object O a field F. The field F will be stored in force-app/main/default/nmsp__O/F__c.xml-meta....
4-Create new package version for package B with NO validation skip. Package can be created successfully
5-Install package version in new scratch org empty. CumulusCI is successfully installing all dependencies, but when trying to install metadata, getting the following errors:
Error: CustomField Not in package.xml, Details: O__c.F__c: Not in package.xml
Expected result
I should be able to successsuly install package
Actual result
Cannot install package (error)
Additional information
System Information
@salesforce/cli/2.78.3 darwin-arm64 node-v20.17.0
- Dominant language
- No language data
- Stars
- 571
- Forks
- 80
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from forcedotcom/cli
-
investigating validated
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
forcedotcom/cli#3657 · 2 comments ·
-
`sf agent preview` fails with `AgentApiNotFound` against staging (aws-stage1) orgs — `stage.api.salesforce.com` missing from endpoint fallbackPossibly taken A pull request linked to this issue is open or already merged. Openarea:afdx owned by another team
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
forcedotcom/cli#3645 · 2 comments ·
-
bug investigating validated
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
forcedotcom/cli#3644 · 6 comments ·
-
sf agent mcp asset replace --assets null throws raw TypeError instead of InvalidShapePossibly taken @konkonrong-lgtm claimed this 54 days ago. Openarea:afdx bug investigating owned by another team validated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
forcedotcom/cli#3625 · 4 comments ·
-
area:afdx bug owned by another team
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
forcedotcom/cli#3608 · 2 comments ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Misdetection] `text/tab-separated-values` file misdetected as `text/tsv`Possibly taken @bact claimed this today. Openmisdetection needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
JuliusBrussee/caveman#1189 ·
Maintainers usually reply within 1 day
-
omarchy-menu-keybindings lua bind scan spins at 100% CPU when user config iterates a mocked hl APIOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
omacom/omarchy#14302 · 1 comment ·
Maintainers usually reply within 1 day