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

running force: package:version:create Unlocked Packages cannot be created due to Ancestor version which does not apply to unlocked packages #1407

Closed
andynuk opened this issue Feb 12, 2022 · 2 comments

Comments

@andynuk
Copy link

andynuk commented Feb 12, 2022

Summary

creation of unlocked packages using force:package:version:create cannot be created due to lack of Ancestor version which does not apply to unlocked packages (this only applies to second-generation managed packages see https://help.salesforce.com/s/articleView?id=release-notes.rn_packaging_ancestor_enhancements.htm&type=5&release=236 )

Steps To Reproduce:

Install Cli 7.137.1
See extract from Gitlab runner

sfdx-cli/7.82.0-3d0c527ac6 linux-x64 node-v12.18.3
sfdx-cli: Updating CLI...
sfdx-cli: Updating CLI from 7.82.0-3d0c527ac6 to 7.94.3-a4e7c7955b... done
sfdx-cli: Updating CLI... fetching manifest
sfdx-cli: Updating CLI from 7.94.3-a4e7c7955b to 7.137.1-7555e1e... done

sfdx force:package:version:create --targetdevhubusername DEVHUB --package 0Ho8d00000000XXXX --versionnumber 1.3.0.NEXT --installationkeybypass --wait 10 --json --codecoverage

Expected result
Should return success

Actual result

{
"status": 1,
"name": "Error",
"message": "Can’t create package version. The ancestor version [undefined] you specified isn’t the highest released package version. Set the ancestor version to 1.2.0, and try creating the package version again. You can also specify --skipancestorcheck to override the ancestry requirement.",
"exitCode": 1,
"commandName": "PackageVersionCreateCommand",
"stack": "Error: Can’t create package version. The ancestor version [undefined] you specified isn’t the highest released package version. Set the ancestor version to 1.2.0, and try creating the package version again. You can also specify --skipancestorcheck to override the ancestry requirement.\n at Object.validateAncestorId (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/salesforce-alm/dist/lib/package/packageUtils.js:548:27)\n at /root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/salesforce-alm/dist/lib/package/packageUtils.js:532:25\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\nOuter stack:\n at Function.wrap (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/@salesforce/core/lib/sfdxError.js:171:27)\n at PackageVersionCreateCommand.catch (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/salesforce-alm/dist/ToolbeltCommand.js:253:46)\n at async PackageVersionCreateCommand._run (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/@salesforce/command/lib/sfdxCommand.js:85:13)\n at async Config.runCommand (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/@oclif/config/lib/config.js:173:24)\n at async SfdxMain.run (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/@oclif/command/lib/main.js:27:9)\n at async SfdxMain._run (/root/.local/share/sfdx/client/7.137.1-7555e1e/node_modules/@oclif/command/lib/command.js:43:20)\n at async Object.run (/root/.local/share/sfdx/client/7.137.1-7555e1e/dist/cli.js:162:47)",
"warnings": []
}

Not upgrading cli version allows package to be created.

Not clear if unlocked packages should use --skipancestorcheck and documentation https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_config_ancestors.htm is only relevant to managed packages.

Cli version 7.136.2 last known version to work correctly

@andynuk andynuk changed the title force:package:version:create Unlocked Packages cannot be created due to Ancestor version which does not apply to unlocked packages running force:package:version:create Unlocked Packages cannot be created due to Ancestor version which does not apply to unlocked packages Feb 12, 2022
@andynuk andynuk changed the title running force:package:version:create Unlocked Packages cannot be created due to Ancestor version which does not apply to unlocked packages running force: package:version:create Unlocked Packages cannot be created due to Ancestor version which does not apply to unlocked packages Feb 12, 2022
@arafesthain
Copy link

Same here, never got this error before Friday

@iowillhoit
Copy link
Contributor

Hey all, this is a duplicate of #1403. The packaging team is working on a fix. We are hoping to have a hotfix of sfdx out soon. Closing this issue to keep info in one place. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants