0

We have an "extension" package that integrates our managed 1GP with a third party managed 1GP. This "extension" package is realized as a managed 2GP.

We hit a problem when trying to create a patch release for the "extension" package - each time we tried to create the patch version using a command line like this:

sfdx force:package:version:create --package "Our Package" --installationkey "SomeKey" \
    --definitionfile config/our-scratch-def.json --wait 120 --codecoverage

We would see the following output:

Request in progress. Sleeping 30 seconds. Will wait a total of 7200 more seconds before timing out. Current Status='Initializing'
Request in progress. Sleeping 30 seconds. Will wait a total of 7170 more seconds before timing out. Current Status='Verifying features and settings'
ERROR running force:package:version:create: Communities: Chatter Community domain must be set prior to enabling Communities

The "extension" package doesn't actually include any community-related metadata, so this is really confusing. The required scratch def does enable Community features, but only because of the needs of one or other dependency 1GP.

config/our-scratch-def.json:

{
  "orgName": "Our Org Name",
  "edition": "Developer",
  "hasSampleData": false,
  "features": [
    "API",
    "AuthorApex",
    "Communities",
    "DebugApex",
    "PlatformEncryption",
    "ProcessBuilder",
    "Sites",
    "Workflow"
  ],
  "settings": {
    "nameSettings": {
      "enableMiddleName": true
    },
    "communitiesSettings": {
      "enableNetworksEnabled": true
    },
    "chatterSettings": {
      "enableChatter": true
    },
    "emailAdministrationSettings": {
      "enableEnhancedEmailEnabled": true
    },
    "pathAssistantSettings": {
      "pathAssistantEnabled": true
    }
  }
}

sfdx-project.json:

{
  "namespace": "namespace",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "48.0",
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true,
      "package": "Our Package",
      "versionNumber": "1.0.1.NEXT",
      "versionDescription": "A description",
      "ancestorId": "Our Package@1.0.0",
      "definitionFile": "config/our-scratch-def.json",
      "postInstallScript": "namespace.OurInstaller",
      "dependencies": [
        {
          "package": "Core Package@2.2.0"
        },
        {
          "package": "Third Party Package@5.10.4.1"
        }
      ]
    },
    {
      "path": "force-unpackaged"
    }
  ],
  "packageAliases": {
    "Core Package@2.2.0": "04t0..."
    "Third Party Package@5.10.4.1": "04t4...",
    "Our Package": "0Ho3...",
    "Our Package@1.0.0": "04t3..."
  }
}

Has anyone seen this issue? Any idea how to resolve it?

0

It turns out the error message is a complete red herring; this is nothing to do with communities and all to do with not having had patch version creation enabled on the package's namespace org. This is mentioned in the documentation (something to stumble upon and the reason I'm posting this Q&A to make it easier to find):

To enable patch versioning, log a case in the Salesforce Partner Community and request patch versioning be enabled in the org where you created the namespace for this package

Something else not mentioned in any documentation I can find, but apparently (according to Salesforce Support, with no citation of any documentation):

You need to have your Application/s passed the Security Review [for Salesforce to] proceed with your request

A very confusing, undocumented requirement; it's not like you can do anything extra in creating a patch release than you can do when creating major or minor version releases (indeed, quite the opposite). In the end we were forced to create a minor version release instead of a patch, which doesn't reflect the purpose of the release.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.