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

Package subscriber ID exists in Dev Hub org, but no subscriber package version record found in scratch org. #2268

Closed
kyleschiess opened this issue Jun 27, 2023 · 12 comments
Labels
area:packaging investigating We're actively investigating this issue owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated

Comments

@kyleschiess
Copy link

kyleschiess commented Jun 27, 2023

Summary

I'm following these docs to test the installation of a package.

If I run this command:

sf package1 version list -o my_dev_hub_org_username

I can see these results:

MetadataPackageVersionId MetadataPackageId Name Version ReleaseState BuildNumber
──────────────────────── ──────────────────
04tHo000000EeL6IAK 033Ho000000DmcnIAC ver 0.1 0.1.0 Beta 1

However, if I run this command:

sf package install --package 04tHo000000EeL6IAK -o my_scratch_org_username

I get this error:

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

If I add the --dev-debug flag, I also see this bit that might be adding to the problem:

sf:subscriberPackageVersion DEBUG This directory does not contain a valid Salesforce DX project. +0ms

I saw this stack question that looks like the same issue, but I wanted open an issue in case it's something else.

Steps To Reproduce

Link to public repo

Expected result

Based on step 10 of the documentation linked above, I should be able to see the installed package in the my_scratch_org_username org.

Actual result

There are no installed packages in my_scratch_org_username and I am shown this error from the CLI:

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

System Information

Using Visual Studio Code 1.79.2. Terminal is zsh.

Salesforce CLI:

{
  "cliVersion": "@salesforce/cli/1.83.4",
  "architecture": "darwin-arm64",
  "nodeVersion": "node-v20.0.0",
  "osVersion": "Darwin 22.5.0",
  "shell": "zsh",
  "rootPath": "/opt/homebrew/lib/node_modules/@salesforce/cli",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.0 (core)",
    "@oclif/plugin-commands 2.2.15 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.25 (core)",
    "@oclif/plugin-plugins 3.1.2 (core)",
    "@oclif/plugin-search 0.0.17 (core)",
    "@oclif/plugin-update 3.1.18 (core)",
    "@oclif/plugin-version 1.3.4 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.37 (core)",
    "@oclif/plugin-which 2.2.22 (core)",
    "@salesforce/cli 1.83.4 (core)",
    "apex 2.3.3 (core)",
    "auth 2.8.1 (core)",
    "data 2.3.24 (core)",
    "deploy-retrieve 1.12.0 (core)",
    "info 2.6.20 (core)",
    "limits 2.3.20 (core)",
    "login 1.2.11 (core)",
    "org 2.9.12 (core)",
    "packaging 1.20.0 (user)",
    "schema 2.3.13 (core)",
    "settings 1.4.12 (core)",
    "sobject 0.1.25 (core)",
    "source 2.10.15 (core)",
    "telemetry 2.2.1 (core)",
    "templates 55.4.21 (core)",
    "trust 2.4.20 (core)",
    "user 2.3.17 (core)"
  ]
}

Additional information

Some output from --dev-debug that might be relevant:

  sf:subscriberPackageVersion DEBUG This directory does not contain a valid Salesforce DX project. +0ms
  sf:subscriberPackageVersion DEBUG Checking package: [04tHo000000EeL6IAK] for external sites +0ms
  sf:connection DEBUG request: {"method":"GET","url":"https://site-agility-3564-dev-ed.scratch.my.salesforce.com/services/data/v58.0/tooling/query?q=SELECT%20AppExchangeDescription%2CAppExchangeLogoUrl%2CAppExchangePackageName%2CAppExchangePublisherName%2CBuildNumber%2CCspTrustedSites%2CDependencies%2CDescription%2CId%2CInstallValidationStatus%2CIsBeta%2CIsDeprecated%2CIsManaged%2CIsOrgDependent%2CIsPasswordProtected%2CIsSecurityReviewed%2CMajorVersion%2CMinorVersion%2CName%2CPackage2ContainerOptions%2CPatchVersion%2CPostInstallUrl%2CProfiles%2CPublisherName%2CReleaseNotesUrl%2CReleaseState%2CRemoteSiteSettings%2CSubscriberPackageId%20FROM%20SubscriberPackageVersion%20WHERE%20Id%20%3D'04tHo000000EeL6IAK'%20AND%20InstallationKey%20%3D'null'","headers":{"content-type":"application/json","user-agent":"sfdx toolbelt:"}} +3ms
Error (1): The subscriber package version 04tHo000000EeL6IAK is invalid, no subscriber package version record found.```
@kyleschiess kyleschiess added the investigating We're actively investigating this issue label Jun 27, 2023
@github-actions
Copy link

Hello @kyleschiess 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

@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 Jun 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 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 Jun 27, 2023
@WillieRuemmele WillieRuemmele added owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. area:packaging labels Jun 27, 2023
@github-actions
Copy link

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

@kyleschiess
Copy link
Author

I reloaded VS Code, which cleared this warning:

sf:subscriberPackageVersion DEBUG This directory does not contain a valid Salesforce DX project. +0ms

@WillieRuemmele
Copy link
Member

Hi @kyleschiess

I tried to reprduce this locally and it worked ok...

 ➜  sf package1 version list -o na40
 MetadataPackageVersionId MetadataPackageId  Name          Version ReleaseState BuildNumber 
 ──────────────────────── ────────────────── ───────────── ─────── ──────────── ─────────── 
 04t4p0000006b2EAAQ       0334p0000004gWWAAY ver 0.1       0.1.0   Beta         2    

 ➜  sf package install --package 04t4p0000006b2EAAQ --wait 30
? This package might send or receive data from these third-party websites:

[nominatim.openstreetmap.org]

Grant access (y/n)? Yes
Waiting 30 minutes for package install to complete.... done
Successfully installed package [04t4p0000006b2EAAQ]

which installed it into my default scratch org... could you add some instructions or steps to follow in your repro repo?

@kyleschiess
Copy link
Author

To replicate this, you'd run all the steps in this documentation:

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_workflow.htm

@WillieRuemmele
Copy link
Member

if you're trying to install a 2GP package, you should use sf package version list you're running package1 version list which lists 1GP packages

@kyleschiess
Copy link
Author

I get the same ID:

% sf package version list

=== Package Versions [1]

 Package Name    Namespace Version Name Version Subscriber Package Version Id Alias                   Installation Key Released Validation Skipped Ancestor Ancestor Version Branch 
 ─────────────── ───────── ──────────── ─────── ───────────────────────────── ─────────────────────── ──────────────── ──────── ────────────────── ──────── ──────────────── ────── 
 Expense Manager RFBase    ver 0.1      0.1.0.1 04tHo000000EeL6IAK            Expense [email protected] true             false    false

@kyleschiess
Copy link
Author

I made a new project directory and ran through those docs again using sf commands. I was able to install the package successfully.

I'm not sure what went wrong the first time around. I was going back and forth between sfdx and sf commands, so maybe I got lost in the documentation and didn't complete certain steps properly.

@fransf-wtax
Copy link

I got this error when supplying an installation key when creating the package, but not when installing it.

The error message is quite misleading. So is the package install command help, which doesn't mention this behavior under the "Flag descriptions" heading.

@QuantumAudio
Copy link

I got the error message when not using an installation key. After using the installation key, the package was installed successfully.

@dcardos
Copy link

dcardos commented Feb 1, 2024

Sorry commenting in this closed issue, but I think I found out the exact problem. In this documentation of Salesforce, the command to install the package with the installation key actually has a new line character. So if you copy and paste without paying attention to that your command will not be in the same line, then you will run into this problem!

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 owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

5 participants