Loading

2GP Package Version Create Fails for Energy & Utilities Cloud Metadata: 0-Byte File Error and Missing QuoteLineItem Fields

Julkaisupäivä: Sep 25, 2026
Kuvaus

When running "sf package version create" against a package that references E&U metadata, you may see:
"An unexpected error occurred. Please contact Salesforce Support and provide the following error code: (-161598528)"
This generic, non-actionable error can be caused by a 0-byte file present anywhere in the SFDX project or a dependent package. It is triggered by a known Oracle JDK zip-processing bug (JDK-8143613), not by anything specific to E&U metadata.

Once that error is cleared, package version creation may proceed to metadata deployment and validation, but report a large number of validation errors (for example, 342) for missing E&U objects and fields, such as QuoteLineItemRecipient, OpportunityLineItemRecipient, QuoteRecipientGroup, and specific QuoteLineItem fields (StartDate, EndDate, Margin, RevenueCloudPackagingFlag, QuoteRecipientGroupId). This happens because the core E&U object model is not fully provisioned in the scratch org used for validation, even when the parent Dev Hub is properly licensed for Energy & Utilities Cloud. Simply listing "EnergyAndUtilitiesCloud", "EAndUSelfServicePortal", or "EAndUDigitalSales" as scratch org features is not sufficient to provision the specific object model that Revenue/CPQ-related E&U metadata depends on.

Ratkaisu
  1. Scan your SFDX project (and any dependent packages) for 0-byte files. Remove any found — a common example is an empty CSS/LWC resource file left behind during development.
  2. Re-run your package version create command (for example: sf package version create --package <package-alias> --installation-key-bypass --code-coverage --wait 30). Confirm the generic (-161598528) error no longer occurs.
  3. If you still see validation errors referencing missing E&U objects or QuoteLineItem fields, update your project-scratch-def.json:
    - Add "EAndUCoreSales" to the "features" array (in addition to your existing E&U feature literals).
    - Add the following to the "settings" block:
       "settings": { "revenueManagementSettings": { "enableCoreCPQ": true } }
  4. Re-create the scratch org and re-run package version create. This combination has been verified to resolve the residual QuoteLineItem field errors (StartDate, EndDate, Margin, RevenueCloudPackagingFlag, QuoteRecipientGroupId) that "EAndUCoreSales" alone does not resolve.

    Note: "EAndUCoreAgentConsole" is not a valid scratch org Features value and will fail outright (INVALID_INPUT) if attempted — do not use it.
Knowledge-artikkelin numero

005460625

 
Ladataan
Salesforce Help | Article