1

Getting following error

Add components {Profile=[Admin]} back into the package version, and create the package version again.

This is my current sfdx-project json of managed package :

"versionName": "1.2",
"versionNumber": "1.2.0.NEXT",
"ancestorVersion": "1.1.0.1"

And now I am creating new beta package with this:

"versionName": "1.3",
"versionNumber": "1.3.0.NEXT",
"ancestorVersion": "1.2.0.1"

any suggestions?

2
  • Did you enable or disable any features in the scratch org def compared with the previous version?
    – Phil W
    Jun 11, 2022 at 7:52
  • No .. no change Jun 11, 2022 at 12:38

1 Answer 1

2

Manageability rules do not allow you to delete components from your managed package at will.

While second-generation packaging allows a broad scope of components to be deleted, you must first log a case to have component deletion made available to you:

To request access to this feature, log a case at Salesforce Partner Community.

After your request is approved, remove the metadata component’s source file from your Salesforce DX project, and create a package version. Test the new package version to ensure it’s working properly without the removed metadata.

Until you have this feature turned on, any uploads you attempt to perform with components removed relative to the package's ancestor version will fail.

7
  • 1
    The challenge is, issue it is complaining ({Profile=[Admin]}) doesn't even exist in my package. I don't know where it is. It is not in my code base. Jun 11, 2022 at 3:32
  • Have you checked your earlier branches and/or commits used when creating package versions (I assume you have, but just checking) to see if that profile existed in one of them? Regardless, if you enable this feature this deletion should then be allowed (despite you not knowing where it originated).
    – Phil W
    Jun 11, 2022 at 7:50
  • yeah I checked that.. that was my first assumption that I might have added it by mistake. but it was never there. Jun 11, 2022 at 12:40
  • I was also wondering with ancestor feature, would be great if any component is deletable if we don't specify ancestorversion. Jun 11, 2022 at 12:44
  • 2
    Be careful - breaking the ancestry line also breaks upgradability and loses you Security Review approval, if you have that
    – David Reed
    Jun 11, 2022 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .