I'm currently trying to get patching working for our 2gp managed package but it's consistently hitting the same set of errors around report folders and report filters (see screenshot). Now I know what you're going to say "Hey Shane, why don't you just fix the errors? Duh" - I know, but there're multiple layers to this:

  • Firstly, it doesn't seem to matter what changes there are in the package, this error will blow. The screenshot below was when I tried to patch a small change I made to a comment(I only patched a comment to see what it would blow up for, a comment change is not the need for the patch).

  • I have tried to remove the filters on the errant reports but regardless, these errors still fire as if the reports were never updated

  • As per this stack exchange question, the package version I'm patching has been Security Reviewed and patching is enabled in our PBO org

So my question is twofold -

  1. Why won't sfdx patch a version that is essentially identical to its parent package? I imagine the patch process is different from initial packaging but surely something that packaged OK can be patched with something as minor as a comment? We have packaged many times since with no problems.

  2. Am I missing something here to get this to work?

The project.json is below followed by the packaging command


    "packageDirectories": [
            "path": "force-app",
            "default": true,
            "package": "PackageXY",
            "definitionFile": "config/project-scratch-def.json",
            "postInstallScript": "PostInstall",
            "ancestorId": "PackageXY@1.9.0-8",
            "versionName": "1.0",
            "versionNumber": "1.9.1.NEXT"
    "namespace": "xy",
    "sfdcLoginUrl": "https://login.salesforce.com",
    "sourceApiVersion": "51.0",
    "packageAliases": {
        "PackageXY@1.9.0-8": "04tXXXXXXXXXXXX"

Package Command

sfdx force:package:version:create --package "PackageXY" --versionname "COMMIT#-patch" --versiondescription "Desc" --targetdevhubusername "user@email.com" --installationkey "XXXXX" --codecoverage --wait 25

Error List

  • 1
    Are you sure patching is enabled on the correct org? Is your PBO your Dev Hub (as required by Salesforce for ISV partners)?
    – Phil W
    Oct 20, 2021 at 14:50
  • 1
    Hey @PhilW, it's a fair question but yeah, I double-checked that the PBO is our Dev Hub and I double-checked the Org ID I put in the case to have it enabled. It's the right org
    – Shane Bird
    Oct 20, 2021 at 15:00
  • 1
    Whoops... I forgot: don't you need to enable it in the namespace org?
    – Phil W
    Oct 20, 2021 at 15:03
  • 1
    It's mentioned in the other Q&A you cited.
    – Phil W
    Oct 20, 2021 at 15:33
  • 1
    Feel free to upvote that other Q&A if it solves the issue :)
    – Phil W
    Oct 20, 2021 at 16:30