When I type:
sfdx package:version:create -p 0Ho... --installation-key-bypass -b 2gp-internal
I get an error:
ERROR running force:package:version:create: Can’t create patch version. Log a case in the Salesforce Partner Community and request that patch versioning be enabled in the org where you created the namespace for this package.
Several days ago, I opened a ticket with Salesforce Support to enable patch versioning on that org and they said they could not unless the app had undergone security review (which is hard since I can't create a version of the app so it can be reviewed).
The Namespace Org contains a 1GP with two Connected Apps and a released managed package (version 2.2.0.7) with a namespace that matches my sfdx-project.json. As an aside, the Connected Apps support an Aura Component Bundle that is a Canvas App so I followed instructions on this page of the Salesforce DX Developer Guide.
This is what my sanitized sfdx-project.json contains:
{
"namespace": "sumthin",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "56.0",
"packageDirectories": [
{
"default": true,
"path": "force-app",
"package": "Company Connector for Salesforce (Internal)",
"versionName": "Aurora 2023.1",
"versionNumber": "2.2.1.NEXT",
"versionDescription": "Some description",
"postInstallScript": "MyPostInstall",
"branch": "2gp-internal",
"definitionFile": "config/project-scratch-def.json"
},
{
"default": false,
"path": "force-app",
"package": "Company Connector for Salesforce",
"versionName": "Aurora 2023.1",
"versionNumber": "2.2.1.NEXT",
"versionDescription": "Some description",
"postInstallScript": "MyPostInstall",
"branch": "2gp",
"definitionFile": "config/project-scratch-def.json"
},
{
"default": false,
"path": "force-app",
"package": "Company Connected Apps",
"versionName": "Aurora 2023",
"versionNumber": "2.2.0.7",
"versionDescription": "Support for Company Connector for Salesforce"
}
],
"packageAliases": {
"Company Connector for Salesforce": "0Ho...",
"Company Connector for Salesforce (Internal)": "0Ho...",
"Company Connected [email protected]": "04t...",
"Company Connected Apps": "033..."
}
}
The last package is only there to document Ids since it's a 1GP that contains the Connected Apps (on the namespace org).
Here's a sanitized version of the ConnectedApp metadata in the 2GP that points back to the Connected App in the released 1GP in the namespace org (developer name has the namespace prefix and the API name of the Connected App in the 1GP)...
<?xml version="1.0" encoding="UTF-8" ?>
<ConnectedApp xmlns="http://soap.sforce.com/2006/04/metadata">
<version>1.0</version>
<developerName>sumthin__CompanyInternalConnectedApp</developerName>
<label>Company Connector for Salesforce (Internal)</label>
<description>Allows users to add Company views to Salesforce</description>
<logoUrl>https://www.example.com/logo.png</logoUrl>
<infoUrl>https://www.example.com</infoUrl>
<contactEmail>[email protected]</contactEmail>
<canvasConfig>
<accessMethod>Post</accessMethod>
<canvasUrl>https://something.example.com</canvasUrl>
<lifecycleClass>MyCanvasLifecycle</lifecycleClass>
<locations>Visualforce</locations>
<locations>Aura</locations>
<locations>ServiceDesk</locations>
<locations>PageLayout</locations>
<samlInitiationMethod>None</samlInitiationMethod>
</canvasConfig>
</ConnectedApp>
Any thoughts as to where I may have gone wrong?