cli icon indicating copy to clipboard operation
cli copied to clipboard

Package metadata can be retrieved for only second-generation managed package version, incorrect release note

Open nwcm opened this issue 2 months ago • 4 comments

https://github.com/forcedotcom/cli/blob/aaea86f6de6087acbd49d48691368f3858541df5/releasenotes/README.md?plain=1#L45

NEW: Retrieve package metadata for a specified package version with the new package version retrieve command. Package metadata can be retrieved for only second-generation managed package versions or unlocked packages.

Actual result using a 2GP package that is not an upgraded 1GP package

Error (DownloadDeveloperPackageZipHasNoDataError): Can't retrieve package metadata. We're unable to retrieve metadata for the package version you specified. Retrieving package metadata is available to converted 2GP package versions only. If the package you specified is a converted 2GP package, try creating a new package version, and then retry retrieving the package metadata for the new package version. If your package is a 1GP, start by converting the package to 2GP, and then retry retrieving metadata from the converted 2GP package version

nwcm avatar Nov 12 '25 22:11 nwcm

Hi @nwcm this might be a server-side problem. I'll need to see the log of the operation to be sure. Can you run the command with --dev-debug flag and share the log?

EstebanRomero84 avatar Nov 19 '25 16:11 EstebanRomero84

Hi @EstebanRomero84 here is the debug log

debug.log

nwcm avatar Nov 20 '25 04:11 nwcm

Hi @nwcm . Your use case (running package version retrieve on a non-converted 2GP package) is supported, but you need to set something first. I'm hunting down the info, stay tuned.

jshackell-sfdc avatar Nov 20 '25 16:11 jshackell-sfdc

@nwcm The field which drives the generation of the zip is Package2VersionCreateRequest.IsDevUsePkgZipRequested. At the moment the CLI does not expose a parameter to set this value but it can still be used via the API directly.

andrewslater avatar Nov 21 '25 14:11 andrewslater