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 scratch org when having Managed Package with ancestorVersion = HIGHEST #2642

Closed
petter-eikeland opened this issue Jan 12, 2024 · 2 comments
Labels
area:packaging investigating We're actively investigating this issue validated Version information for this issue has been validated

Comments

@petter-eikeland
Copy link

Summary

Similar to #1392 & #1453. When having a Managed Package, and using ancestorVersion = HIGHEST, sf throws error that scratch org namespace must match Managed Package namespace. This blocker is not relevant for us as we mostly develop Unlocked Packages, and only use Managed Packages to store and distribute Secrets.

Steps To Reproduce

  1. Have a 2GP managed package
  2. Set "ancestorVersion": "HIGHEST", for the package in sfdx-project.json
  3. Attempt to create a new scratch org and having "namespace": "",

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.

It was a real hassle trying to generate a new namespace and linking it to the existing Dev Org. Failed multiple times with unknown error, so I haven't linked a repo this time

Expected result

Scratch org created successfully

Actual result

Error (1): The scratch org request namespace '[NO NAMESPACE]' must match Ancestor's (04tTe12345678) parent Package2 (0336N1234566) namespace 'test'.: Requested Package2 Ancestor IDs

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.24.4",
  "nodeVersion": "node-v20.10.0",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/user/.local/share/sf/client/2.24.4-c9898a2",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.5 (core)",
    "@oclif/plugin-commands 3.1.0 (core)",
    "@oclif/plugin-help 6.0.10 (core)",
    "@oclif/plugin-not-found 3.0.8 (core)",
    "@oclif/plugin-plugins 4.1.15 (core)",
    "@oclif/plugin-search 1.0.11 (core)",
    "@oclif/plugin-update 4.1.7 (core)",
    "@oclif/plugin-version 2.0.11 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.9 (core)",
    "@oclif/plugin-which 3.0.14 (core)",
    "@salesforce/cli 2.24.4 (core)",
    "1commerce 0.0.10 (user)",
    "apex 3.0.17 (core)",
    "auth 3.2.0 (core)",
    "community 3.0.12 (user)",
    "data 3.0.14 (core)",
    "deploy-retrieve 3.1.0 (core)",
    "info 3.0.15 (core)",
    "limits 3.1.2 (core)",
    "marketplace 1.0.16 (core)",
    "org 3.2.2 (core)",
    "packaging 2.1.0 (user)",
    "schema 3.1.0 (core)",
    "settings 2.0.15 (core)",
    "signups 2.0.15 (user)",
    "sobject 1.1.0 (core)",
    "source 3.1.3 (core)",
    "telemetry 3.1.9 (core)",
    "templates 56.0.9 (core)",
    "trust 3.3.1 (core)",
    "user 3.2.1 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.1.1 (user)",
    "sfdmu 4.32.2 (user)",
    "sfdx-browserforce-plugin 4.0.0 (user)"
  ]
}
@petter-eikeland petter-eikeland added the investigating We're actively investigating this issue label Jan 12, 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.

@github-actions github-actions bot added the validated Version information for this issue has been validated label Jan 12, 2024
@petter-eikeland
Copy link
Author

This was fixed using the -c flag in sf org create scratch -c.
Apologies for not checking through all the flags before reporting issue

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

2 participants