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

sf package install provides incorrect errors with missing/incorrect installation key #2882

Closed
jclark-dot-org opened this issue May 22, 2024 · 5 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@jclark-dot-org
Copy link

Summary

When using sf package install to install a package that was created with an installation key, if you omit the installation key or provide an incorrect key, the error message is misleading, unless you also include the -b | --publish-wait flag.

Please note, this has only been tested with unlocked packages.

Steps To Reproduce

You can reproduce this with any package that has an installation key; I've provided one of my unlocked package versions below. Feel free to substitute any unlocked package version with an installation key.

Example 1: Attempt to install the package without an installation key:

sf package install -w 30 -p 04tQi0000006nyxIAA -a package

Example 2: Attempt to install the package with an incorrect installation key:

sf package install -w 30 -p 04tQi0000006nyxIAA -a package -k SEEKRIT

Expected result

An appropriate error message should be displayed, such as:

Example 1:

Please provide installationkey when querying against SubscriberPackageVersion that is protected by installationkey

Example 2:

Invalid InstallationKey for SubscriberPackageVersion

Actual result

Both examples fail with the error:

Error (1): The subscriber package version 04tQi0000006nyxIAA is invalid, no subscriber package version record found.

NOTE
If you add the -b | --publish-wait flag, the incorrect error is replaced with another incorrect error:

The subscriber package version is not fully available.

BUT, it is then followed with the message "Try This:", which is followed by the correct, useful error messages from the Expected Results above.

System Information

zsh (oh my zsh), on Iterm2 on Mac OS Sonoma

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.41.8",
  "nodeVersion": "node-v21.4.0",
  "osVersion": "Darwin 23.3.0",
  "rootPath": "/Users/jclark/.nvm/versions/node/v21.4.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.17 (core)",
    "@oclif/plugin-commands 3.3.2 (core)",
    "@oclif/plugin-help 6.0.21 (core)",
    "@oclif/plugin-not-found 3.1.8 (core)",
    "@oclif/plugin-plugins 5.0.19 (core)",
    "@oclif/plugin-search 1.0.23 (core)",
    "@oclif/plugin-update 4.2.11 (core)",
    "@oclif/plugin-version 2.0.18 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.16 (core)",
    "@oclif/plugin-which 3.1.9 (core)",
    "@salesforce/cli 2.41.8 (core)",
    "apex 3.1.11 (core)",
    "auth 3.6.9 (core)",
    "data 3.3.4 (core)",
    "deploy-retrieve 3.6.13 (core)",
    "info 3.2.7 (core)",
    "limits 3.3.5 (core)",
    "marketplace 1.2.5 (core)",
    "org 4.1.8 (core)",
    "packaging 2.4.2 (core)",
    "schema 3.3.6 (core)",
    "settings 2.2.6 (core)",
    "sobject 1.4.1 (core)",
    "source 3.3.9 (core)",
    "telemetry 3.3.5 (core)",
    "templates 56.2.5 (core)",
    "trust 3.6.8 (core)",
    "user 3.5.5 (core)"
  ]
}
@jclark-dot-org jclark-dot-org added the investigating We're actively investigating this issue label May 22, 2024
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.

Copy link

Hello @jclark-dot-org 👋 None of the versions of sf you shared match the latest release.

Shared: 2.41.8
Latest: 2.42.6

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 May 22, 2024
@jclark-dot-org
Copy link
Author

I have updated to 2.42.6 and have confirmed that the issue remains; all outputs in the original issue remain unchanged.

New version info:

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.42.6",
  "nodeVersion": "node-v21.4.0",
  "osVersion": "Darwin 23.3.0",
  "rootPath": "/Users/jclark/.nvm/versions/node/v21.4.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.18 (core)",
    "@oclif/plugin-commands 3.3.4 (core)",
    "@oclif/plugin-help 6.0.22 (core)",
    "@oclif/plugin-not-found 3.1.9 (core)",
    "@oclif/plugin-plugins 5.0.21 (core)",
    "@oclif/plugin-search 1.0.24 (core)",
    "@oclif/plugin-update 4.2.12 (core)",
    "@oclif/plugin-version 2.1.2 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.19 (core)",
    "@oclif/plugin-which 3.1.10 (core)",
    "@salesforce/cli 2.42.6 (core)",
    "apex 3.1.11 (core)",
    "auth 3.6.11 (core)",
    "data 3.3.5 (core)",
    "deploy-retrieve 3.6.14 (core)",
    "info 3.2.8 (core)",
    "limits 3.3.7 (core)",
    "marketplace 1.2.5 (core)",
    "org 4.1.10 (core)",
    "packaging 2.4.4 (core)",
    "schema 3.3.6 (core)",
    "settings 2.2.6 (core)",
    "sobject 1.4.2 (core)",
    "source 3.3.12 (core)",
    "telemetry 3.3.7 (core)",
    "templates 56.2.7 (core)",
    "trust 3.6.11 (core)",
    "user 3.5.8 (core)"
  ]
}

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

Thanks for the issue @jclark-dot-org, we will get this looked at and try to improve this messaging.

@iowillhoit iowillhoit added the bug Issue or pull request that identifies or fixes a bug label May 22, 2024
Copy link

git2gus bot commented May 22, 2024

This issue has been linked to a new work item: W-15832085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug 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

3 participants