Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create 2GP managed package #2494

Closed
aozomaro opened this issue Sep 27, 2023 · 7 comments
Closed

Unable to create 2GP managed package #2494

aozomaro opened this issue Sep 27, 2023 · 7 comments
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated

Comments

@aozomaro
Copy link

Note
Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

When we try to create a managed package we get an error which indicates that the package.xml API version is invalid. More specifically we receive this error message:
Multiple errors occurred: \n(1) package.xml: Invalid version specified:59.0

Steps To Reproduce

  1. Generate a managed package release by running the following command: sfdx package:version:create -p "Our Package" -v dev-hub -c -w 60 --verbose --json

Expected result

Build should create package successfully

Actual result

Multiple errors occurred: \n(1) package.xml: Invalid version specified:59.0

System Information

{
"cliVersion": "@salesforce/cli/2.8.11",
"architecture": "linux-x64",
"nodeVersion": "node-v18.14.0",
"osVersion": "Linux 5.15.0-1028-aws",
"shell": "bash",
"rootPath": "/opt/circleci/.nvm/versions/node/v18.14.0/lib/node_modules/@salesforce/cli",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.8 (core)",
"@oclif/plugin-commands 2.2.25 (core)",
"@oclif/plugin-help 5.2.19 (core)",
"@oclif/plugin-not-found 2.4.1 (core)",
"@oclif/plugin-plugins 3.4.2 (core)",
"@oclif/plugin-search 0.0.22 (core)",
"@oclif/plugin-update 3.2.3 (core)",
"@oclif/plugin-version 1.3.10 (core)",
"@oclif/plugin-warn-if-update-available 2.1.0 (core)",
"@oclif/plugin-which 2.2.32 (core)",
"@salesforce/cli 2.8.11 (core)",
"apex 2.3.14 (core)",
"auth 2.8.16 (core)",
"data 2.5.8 (core)",
"deploy-retrieve 1.17.8 (core)",
"info 2.6.40 (core)",
"limits 2.3.33 (core)",
"login 1.2.29 (core)",
"marketplace 0.1.3 (core)",
"org 2.10.6 (core)",
"schema 2.3.25 (core)",
"settings 1.4.28 (core)",
"sobject 0.2.6 (core)",
"source 2.10.33 (core)",
"telemetry 2.3.1 (core)",
"templates 55.5.11 (core)",
"trust 2.6.9 (core)",
"user 2.3.32 (core)"
]
}
@aozomaro aozomaro added the investigating We're actively investigating this issue label Sep 27, 2023
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions
Copy link

Hello @aozomaro 👋 None of the versions of sf you shared match the latest release.

Shared: 2.8.11
Latest: 2.10.2

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Sep 27, 2023
@aozomaro
Copy link
Author

Thanks. I updated the CLI and received the same error. Here is the output.

{
"cliVersion": "@salesforce/cli/2.10.2",
"architecture": "linux-x64",
"nodeVersion": "node-v18.14.0",
"osVersion": "Linux 5.15.0-1028-aws",
"shell": "bash",
"rootPath": "/opt/circleci/.nvm/versions/node/v18.14.0/lib/node_modules/@salesforce/cli",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.3.8 (core)",
"@oclif/plugin-commands 2.2.25 (core)",
"@oclif/plugin-help 5.2.19 (core)",
"@oclif/plugin-not-found 2.4.1 (core)",
"@oclif/plugin-plugins 3.7.1 (core)",
"@oclif/plugin-search 0.0.22 (core)",
"@oclif/plugin-update 3.2.3 (core)",
"@oclif/plugin-version 1.3.10 (core)",
"@oclif/plugin-warn-if-update-available 2.1.0 (core)",
"@oclif/plugin-which 2.2.32 (core)",
"@salesforce/cli 2.10.2 (core)",
"apex 2.3.15 (core)",
"auth 2.8.17 (core)",
"data 2.5.9 (core)",
"deploy-retrieve 1.18.0 (core)",
"info 2.6.43 (core)",
"limits 2.3.34 (core)",
"login 1.2.31 (core)",
"marketplace 0.2.2 (core)",
"org 2.10.8 (core)",
"schema 2.3.26 (core)",
"settings 1.4.29 (core)",
"sobject 0.2.7 (core)",
"source 2.10.34 (core)",
"telemetry 2.3.3 (core)",
"templates 55.5.12 (core)",
"trust 2.6.13 (core)",
"user 2.3.32 (core)"
]
}

@github-actions github-actions bot added investigating We're actively investigating this issue validated Version information for this issue has been validated and removed more information required Issue requires more information or a response from the customer labels Sep 28, 2023
@shetzel
Copy link
Contributor

shetzel commented Sep 28, 2023

Has your devhub been updated to API version 59.0? What does your sfdx-project.json look like (redacting anything you prefer to be private), specifically with any API versions or sourceApiVersion?

@mdonnalley mdonnalley added the more information required Issue requires more information or a response from the customer label Sep 28, 2023
@aozomaro
Copy link
Author

aozomaro commented Sep 28, 2023

Has your devhub been updated to API version 59.0? What does your sfdx-project.json look like (redacting anything you prefer to be private), specifically with any API versions or sourceApiVersion?

Thanks for getting back to me.

{
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true,
      "package": "My Package",
      "ancestorVersion": "2.82.0",
      "versionNumber": "2.83.0.NEXT",
      "postInstallScript": "PostInstall",
      "branch": "master",
      "unpackagedMetadata": {
        "path": "unpackaged"
      },
      "apexTestAccess": {
        "permissionSets": [ 
              "PermSet1"
        ]
      }
    },
    {
      "path": "unpackaged",
      "default": false
    }
  ],
  "name": "someAppName",
  "namespace": "SomeNamespace",
  "sourceApiVersion": "58.0",
  "packageAliases": {
    "My Package": "somePackageId",
    "My [email protected]": "someVersionId"
  }
}

@db-lyon
Copy link

db-lyon commented Sep 28, 2023

I also can't create a 2GP managed package. Not sure if it's related..

sf package version create... successfully runs, but when I check the status...
sf package:version:create:report -i 08cJx0000REDACTED --json > result.json

I get:

  "code": 1,
  "context": "PackageVersionCreateReportCommand",
  "commandName": "PackageVersionCreateReportCommand",
  "message": "Cannot read properties of undefined (reading 'Status')",
  "name": "TypeError",
  "status": 1,
  "stack": "TypeError: Cannot read properties of undefined (reading 'Status')\n    at PackageVersionCreateReportCommand.display (C:\\Users\\david\\AppData\\Local\\sf\\node_modules\\@salesforce\\plugin-packaging\\lib\\commands\\package\\version\\create\\report.js:31:40)\n    at PackageVersionCreateReportCommand.run (C:\\Users\\david\\AppData\\Local\\sf\\node_modules\\@salesforce\\plugin-packaging\\lib\\commands\\package\\version\\create\\report.js:27:14)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async PackageVersionCreateReportCommand._run (C:\\Users\\david\\AppData\\Local\\sf\\node_modules\\@oclif\\core\\lib\\command.js:117:22)\n    at async Config.runCommand (C:\\Users\\david\\AppData\\Local\\sf\\client\\2.10.2-1c35561\\node_modules\\@oclif\\core\\lib\\config\\config.js:314:25)\n    at async run (C:\\Users\\david\\AppData\\Local\\sf\\client\\2.10.2-1c35561\\node_modules\\@oclif\\core\\lib\\main.js:89:16)",
  "exitCode": 1,
  "warnings": []
}

@aozomaro
Copy link
Author

My issue has been resolved.

Th following blurb from SFDC support i what fixed the issue.

Please try to use "released: previous" and apiVersio 58.0. then you can enforce this package created in apiversion 58.0 and that released version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

4 participants