Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue creating package version for packages containing fields for object owned by dependant package #1742

Closed
SRS-Dxtreme opened this issue Oct 7, 2022 · 26 comments
Labels
bug Issue or pull request that identifies or fixes a bug more information required Issue requires more information or a response from the customer

Comments

@SRS-Dxtreme
Copy link

Summary

Yesterday we encountered and error when versioning one of our packages:

{
  "status": 1,
  "name": "",
  "message": "Multiple errors occurred:\n(1) XXXX__c.YYYY__c: An object 'XXXX__c.YYYY__c' of type CustomField was named in package.xml, but was not found in zipped directory\n(2) XXXX__c.ZZZZ__c: An object 'XXXX__c.ZZZZ__c' of type CustomField was named in package.xml, but was not found in zipped directory",
  "exitCode": 1,
  "context": "PackageVersionCreateCommand",
  "stack": "Multiple errors occurred:\n(1) XXXX__c.YYYY__c: An object 'XXXX__c.YYYY__c' of type CustomField was named in package.xml, but was not found in zipped directory\n(2) XXXX__c.ZZZZ__c: An object 'XXXX__c.ZZZZ__c' of type CustomField was named in package.xml, but was not found in zipped directory\n    at Function.wrap (/tmp/sfdx/node_modules/@salesforce/core/lib/sfError.js:61:25)\n    at PackageVersionCreateCommand.catch (/tmp/sfdx/node_modules/salesforce-alm/dist/ToolbeltCommand.js:255:44)\n    at async PackageVersionCreateCommand._run (/tmp/sfdx/node_modules/@salesforce/command/lib/sfdxCommand.js:106:13)\n    at async Config.runCommand (/tmp/sfdx/node_modules/@oclif/core/lib/config/config.js:272:25)\n    at async run (/tmp/sfdx/node_modules/@oclif/core/lib/main.js:76:5)\nCaused by: Error: Multiple errors occurred:\n(1) XXXX__c.YYYY__c: An object 'XXXX__c.YYYY__c' of type CustomField was named in package.xml, but was not found in zipped directory\n(2) XXXX__c.ZZZZ__c: An object 'XXXX__c.ZZZZ__c' of type CustomField was named in package.xml, but was not found in zipped directory\n    at /tmp/sfdx/node_modules/salesforce-alm/dist/lib/package/packageUtils.js:712:27\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
  "warnings": [],
  "commandName": "PackageVersionCreateCommand"
}

This seems to include both custom objects and custom settings with the same package dependency structure.

Steps To Reproduce:

  1. Create a package A containing a new custom object.
  2. Create package B with a dependency to A. Add a custom field to the object owned by package A
  3. Version the package

Expected result

A new version of package B should be created containing the new fields.

Actual result

Encountered error as described above ☝️

@SRS-Dxtreme SRS-Dxtreme added the investigating We're actively investigating this issue label Oct 7, 2022
@github-actions
Copy link

github-actions bot commented Oct 7, 2022

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@warbio
Copy link

warbio commented Oct 7, 2022

We are also experiencing this issue

@chfosli
Copy link

chfosli commented Oct 7, 2022

Same here.

@osjurso
Copy link

osjurso commented Oct 7, 2022

Same issue here.

@shetzel
Copy link
Contributor

shetzel commented Oct 7, 2022

Thanks for posting. Does the same error happen when using the beta command? force:package:beta:version:create? What is the output of sfdx version --verbose?

@shetzel shetzel added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Oct 7, 2022
@chfosli
Copy link

chfosli commented Oct 9, 2022

It worked with the beta command, and here is the output of sfdx version --verbose.

Run sfdx version --verbose
 CLI Version:
	sfdx-cli/7.171.0

 Architecture:
	linux-x6[4](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:5)

 Node Version:
	node-v16.17.0

 Plugin Version:
	@oclif/plugin-autocomplete 1.3.0 (core)
	@oclif/plugin-commands 2.2.0 (core)
	@oclif/plugin-help [5](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:6).1.12 (core)
	@oclif/plugin-not-found 2.3.1 (core)
	@oclif/plugin-plugins 2.1.0 (core)
	@oclif/plugin-update 3.0.0 (core)
	@oclif/plugin-version 1.1.2 (core)
	@oclif/plugin-warn-if-update-available 2.0.4 (core)
	@oclif/plugin-which 2.1.0 (core)
	alias 2.1.3 (core)
	apex 1.2.0 (core)
	auth 2.2.10 (core)
	community 2.0.3 (core)
	config 1.4.21 (core)
	custom-metadata 2.0.1 (core)
	data 2.1.4 (core)
	generator 2.0.2 (core)
	info 2.1.[6](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:7) (core)
	limits 2.0.3 (core)
	org 2.2.[7](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:8) (core)
	packaging 1.9.2 (core)
	schema 2.1.[8](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:9) (core)
	signups 1.2.4 (core)
	source 2.0.16 (core)
	telemetry 2.0.2 (core)
	templates 55.1.0 (core)
	trust 2.0.4 (core)
	user 2.1.7 (core)
	@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)
	salesforce-alm 54.8.1 (core)

 OS and Version:
	Linux 5.15.0-[10](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:11)[20](https://github.com/navikt/crm-ips/actions/runs/3215132392/jobs/5256014833#step:4:21)-azure

 Shell:
	unknown

 Root Path:
	/tmp/sfdx

torhakon added a commit to navikt/crm-nks-base-components that referenced this issue Oct 10, 2022
@ganesh2109-cloud
Copy link

ganesh2109-cloud commented Oct 11, 2022

Facing the same issue. Any intention of having this fixed in 7.173.0?

@warbio
Copy link

warbio commented Oct 11, 2022

We solved it by changing from
force:package:version:create
to
force:package:beta:version:create

@johnforeland
Copy link

Note when using force:package:beta:version:create, sfdx-project.json needs a versionName (could be static). If no versionName is present, package creation fails.

@johnforeland
Copy link

johnforeland commented Oct 13, 2022

Also note, using force:package:beta:version:create, there's currently a bug when using branches on packages. If a package on a branch has a higher version number than another branch, finding the x.x.x.LATEST when using force:package:beta:version:create doesn't work because it ignores which branch you're trying to create a package for.

I'm not talking about GitHub branches, but package branches.

@pranitjain1
Copy link

We are having the same issue too. Did anyone try with latest version (7.172.0)?

@6ithu8u53r
Copy link

We are having the same issue too. Did anyone try with latest version (7.172.0)?

Yes...

  • 7.170.0 - Success
  • 7.171.0 - Failure
  • 7.172.0 - Failure
  • 7.173.0 - Failure

@arafesthain
Copy link

Same issue here

@github-actions
Copy link

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Oct 25, 2022
@SRS-Dxtreme
Copy link
Author

Any updates regarding this? We are now currently running on 7.170 as this is the last version before the error occurred.

@dieffrei
Copy link

dieffrei commented Oct 25, 2022

We got this issue on Monday, we already tried to update to all versions possible, but still not working.
We need an urgent fix

@WillieRuemmele
Copy link
Member

hey @SRS-Dxtreme @dieffrei @arafesthain and any one else, it sounds like using the beta commands doesn't run into this error. We're hoping to verify that the beta commands are working as expected and will be GA'ing them in the near-future

@arafesthain
Copy link

arafesthain commented Oct 25, 2022

@WillieRuemmele yep you right but it has an other error (#1764) that prevent us to use it, so how should we proceed?

@SRS-Dxtreme
Copy link
Author

We used the beta command for a few days and encountered another error where the packaged metadata was installed differently in a sandbox and production environment. In our case an Apex class was installed in sandbox with a correctly commented line of code whereas when the package version was promoted and installed in production, the very same code line was not commented out.

@github-actions github-actions bot removed the stale label Oct 26, 2022
@github-actions
Copy link

github-actions bot commented Nov 3, 2022

This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.

@github-actions github-actions bot added the stale label Nov 3, 2022
@pranitjain1
Copy link

We still get issues with latest CLI.

@github-actions github-actions bot removed the stale label Nov 4, 2022
@pranitjain1
Copy link

pranitjain1 commented Nov 8, 2022

@WillieRuemmele beta package command did not solve our error. We still get the same error that we get in normal package create command.

@peternhale peternhale added the bug Issue or pull request that identifies or fixes a bug label Nov 9, 2022
@git2gus
Copy link

git2gus bot commented Nov 9, 2022

This issue has been linked to a new work item: W-12034397

@6ithu8u53r
Copy link

Version 7.179.0 is working for me.

@peternhale
Copy link
Contributor

Thanks for letting us know @6ithu8u53r.

@RodEsp
Copy link
Contributor

RodEsp commented Dec 1, 2022

@RodEsp RodEsp closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests