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

Potential cli version issue when packaging and installing into a sandbox and receiving error #2395

Closed
jdschleicher opened this issue Aug 7, 2023 · 6 comments
Labels
area:packaging investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@jdschleicher
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

Issue occurring with multiple teams as they attempt to install into an integration sandbox.

Teams experienced the issue with minimal changes to the package codebase.

full error message below:

{   "code": 1,   "context": "Install",   "commandName": "Install",   "message": "Encountered errors installing the package! Installation errors: \n1) An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory, Details: Admin: An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory",   "name": "PackageInstallError",   "status": 1,   "stack": "PackageInstallError: Encountered errors installing the package! Installation errors: \n1) An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory, Details: Admin: An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory\n    at Messages.createError (/home/runner/.local/share/sf/node_modules/@salesforce/core/lib/messages.js:393:16)\n    at Report.parseStatus (/home/runner/.local/share/sf/node_modules/@salesforce/plugin-packaging/lib/commands/package/install/report.js:35:31)\n    at Install.run (/home/runner/.local/share/sf/node_modules/@salesforce/plugin-packaging/lib/commands/package/install.js:116:42)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Install._run (/home/runner/.local/share/sf/node_modules/@oclif/core/lib/command.js:117:22)\n    at async Config.runCommand (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/config/config.js:329:25)\n    at async run (/usr/local/lib/node_modules/@salesforce/cli/node_modules/@oclif/core/lib/main.js:89:16)",   "exitCode": 1,   "warnings": [     "The \"force package install\" command has been deprecated. Use \"package install\" instead.",     "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable.",     "The \"--targetusername\" flag has been deprecated. Use \"--target-org | -o\" instead.",     "The \"--noprompt\" flag has been deprecated. Use \"--no-prompt | -r\" instead.",     "The \"--apexcompile\" flag has been deprecated. Use \"--apex-compile | -a\" instead.",     "The \"--upgradetype\" flag has been deprecated. Use \"--upgrade-type | -t\" instead."   ] }

Steps To Reproduce

IMPORTANT
Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue.
We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

To reproduce ( will get a repo up shortly ) :

Last successful package build was done using old sfdx cli version: sfdx-cli/7.209.6 linux-x64 node-v18.17.0

We were able to create a package version and install to target environment that has api version 58.0

We then moved to get the latest sfdx cli (sf unified cli) and are now on : "@salesforce/cli/2.2.7 (see below for full version detail )

We would receive the below error message when we created a package version and attempted to install into the integration sandbox.

I was able to recreate the issue in a scratch org by:

  • setting up a scratch org with 7.209.6
  • installing dependencies of package
  • create "skip-validation" package
  • install package to scratch org
  • no need to change cli versions in reproducing error, just needed to install package versuini that was created with latest sf cli version ( 2.2.7). There were also no differences seen when changing sfdx commands to sf commands.

Expected result

Actual result

System Information

{
  "cliVersion": "@salesforce/cli/2.2.7",
  "architecture": "linux-x64",
  "nodeVersion": "node-v18.17.0",
  "osVersion": "Linux 5.15.0-1042-azure",
  "shell": "bash",
  "rootPath": "/usr/local/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.3 (core)",
    "@oclif/plugin-commands 2.2.20 (core)",
    "@oclif/plugin-help 5.2.14 (core)",
    "@oclif/plugin-not-found 2.3.34 (core)",
    "@oclif/plugin-plugins 3.1.8 (core)",
    "@oclif/plugin-search 0.0.21 (core)",
    "@oclif/plugin-update 3.1.28 (core)",
    "@oclif/plugin-version 1.3.7 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.45 (core)",
    "@oclif/plugin-which 2.2.27 (core)",
    "@salesforce/cli 2.2.7 (core)",
    "apex 2.3.8 (core)",
    "auth 2.8.9 (core)",
    "data 2.5.3 (core)",
    "deploy-retrieve 1.16.3 (core)",
    "info 2.6.32 (core)",
    "limits 2.3.27 (core)",
    "login 1.2.22 (core)",
    "org 2.9.27 (core)",
    "schema 2.3.21 (core)",
    "settings 1.4.21 (core)",
    "sobject 0.1.40 (core)",
    "source 2.10.27 (core)",
    "telemetry 2.2.3 (core)",
    "templates 55.5.7 (core)",
    "trust 2.4.34 (core)",
    "user 2.3.27 (core)"
  ]
}

Additional information

@jdschleicher jdschleicher added the investigating We're actively investigating this issue label Aug 7, 2023
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

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 github-actions bot added the validated Version information for this issue has been validated label Aug 7, 2023
@iowillhoit iowillhoit changed the title Potential cli version issue when packaging and installing into a sandbox and receiving error: "code": 1, "context": "Install", "commandName": "Install", "message": "Encountered errors installing the package! Installation errors: \n1) An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory, Details: Admin: An object 'Admin' of type Profile was named in package.xml, but was not found in zipped directory", "name": "PackageInstallError", "status": 1, "stack": "PackageInstallError Potential cli version issue when packaging and installing into a sandbox and receiving error Aug 7, 2023
@burntsugar
Copy link

We have observed this failure using the docker container, as well as local cli:
Docker: salesforce/salesforcedx:latest-full - DIGEST:sha256:f36cc32d4d2b68af1f7b9ae10ccdbfadcdd27caa2245f3876180ccde83163898
Local CLI: @Salesforce/cli@2.2.7

@calvinle1
Copy link

Same issue experienced here - is there an update or workaround?

@jdschleicher
Copy link
Author

@calvinle1 @burntsugar the only workaround i have found so far is to revert back to the cli version that worked last before the failures started occurring

@daniellsamonte
Copy link

daniellsamonte commented Aug 21, 2023

I am also encountering the same issue with sf cli command and weirdly enough its only happening to me whilest my other team members have no issue with it.
The error i get from installing new package versions generated from the v2 sf cli (any version) are as follows:
Details: Integration: An object 'Integration' of type Profile was named in package.xml, but was not found in zipped directory

I was only able to generate a non-corrupted package version and install it to my target org while using the old sfdx cli (sfdx-cli/7.209.6 darwin-x64 node-v20.5.1) as a workaround.

Things i have tried:

  • Uninstall sf and sfdx cli
  • Reinstall node and npm
  • Ensure sourceApiVersion matches apiVersion
  • Ran sf doctor (all checks passed)

System Information

{
  "versionDetail": {
    "cliVersion": "@salesforce/cli/2.4.10",
    "architecture": "darwin-x64",
    "nodeVersion": "node-v20.5.1",
    "osVersion": "Darwin 22.5.0",
    "shell": "zsh",
    "rootPath": "/usr/local/lib/node_modules/@salesforce/cli",
    "pluginVersions": [
      "@oclif/plugin-autocomplete 2.3.6 (core)",
      "@oclif/plugin-commands 2.2.21 (core)",
      "@oclif/plugin-help 5.2.16 (core)",
      "@oclif/plugin-not-found 2.3.36 (core)",
      "@oclif/plugin-plugins 3.2.0 (core)",
      "@oclif/plugin-search 0.0.22 (core)",
      "@oclif/plugin-update 3.1.30 (core)",
      "@oclif/plugin-version 1.3.8 (core)",
      "@oclif/plugin-warn-if-update-available 2.0.46 (core)",
      "@oclif/plugin-which 2.2.29 (core)",
      "@salesforce/cli 2.4.10 (core)",
      "apex 2.3.10 (core)",
      "auth 2.8.12 (core)",
      "data 2.5.5 (core)",
      "deploy-retrieve 1.17.2 (core)",
      "info 2.6.38 (core)",
      "limits 2.3.29 (core)",
      "login 1.2.25 (core)",
      "org 2.9.30 (core)",
      "packaging 1.21.4 (user)",
      "schema 2.3.22 (core)",
      "settings 1.4.24 (core)",
      "sobject 0.2.2 (core)",
      "source 2.10.30 (core)",
      "telemetry 2.2.5 (core)",
      "templates 55.5.9 (core)",
      "trust 2.5.4 (core)",
      "user 2.3.28 (core)"
    ]
  }

@iowillhoit
Copy link
Contributor

A fix for this has been released in plugin-packaging version 1.25.1. This version is included in the latest version of @salesforce/cli. If you are still seeing issues, please open a new issue. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:packaging investigating We're actively investigating this issue validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

6 participants