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 version create --json not returning proper json output #2562

Closed
cheyenneralston-ncino opened this issue Nov 8, 2023 · 9 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

@cheyenneralston-ncino
Copy link

Summary

Running the sf package version create --json does not return proper json output due to installing the packaging plugin.

Steps To Reproduce

  1. Run sf package version create --json --skip-ancestor-check --version-number 1.1.0.NEXT --definition-file config/project-scratch-def.json --package "<PACKAGE_NAME>" --installation-key-bypass --skip-validation --version-name "ver 1.1.0" in a 2GP project

Expected result

  {
    "status": 0,
    "result": {
      "Id": "<PACKAGE_ID>",
      "Status": "Queued",
      "Package2Id": "PACKAGE_2ID",
      "Package2VersionId": null,
      "SubscriberPackageVersionId": null,
      "Tag": "",
      "Branch": null,
      "Error": [],
      "CreatedDate": "2023-11-08 19:34",
      "HasMetadataRemoved": null,
      "CreatedBy": "",
      "ConvertedFromVersionId": "Request is queued. ID unavailable."
    },
    "warnings": []
  }

Actual result

These warnings can only be addressed by the owner(s) of @salesforce/plugin-packaging.
  We suggest that you create an issue at https://github.com/forcedotcom/cli/issues and ask the plugin owners to address them.
  
  
  Successfully installed @salesforce/plugin-packaging v1.27.0
  {
    "status": 0,
    "result": {
      "Id": "<PACKAGE_ID>",
      "Status": "Queued",
      "Package2Id": "PACKAGE_2ID",
      "Package2VersionId": null,
      "SubscriberPackageVersionId": null,
      "Tag": "",
      "Branch": null,
      "Error": [],
      "CreatedDate": "2023-11-08 19:34",
      "HasMetadataRemoved": null,
      "CreatedBy": "",
      "ConvertedFromVersionId": "Request is queued. ID unavailable."
    },
    "warnings": []
  }

System Information

System: ubuntu
Shell: bash

  {
    "architecture": "linux-x64",
    "cliVersion": "@salesforce/cli/2.16.7",
    "nodeVersion": "node-v20.9.0",
    "osVersion": "Linux 6.2.0-1015-azure",
    "rootPath": "/opt/hostedtoolcache/node/20.9.0/x64/lib/node_modules/@salesforce/cli",
    "shell": "bash",
    "pluginVersions": [
      "@oclif/plugin-autocomplete 3.0.1 (core)",
      "@oclif/plugin-commands 3.0.5 (core)",
      "@oclif/plugin-help 6.0.5 (core)",
      "@oclif/plugin-not-found 3.0.2 (core)",
      "@oclif/plugin-plugins 4.0.1 (core)",
      "@oclif/plugin-search 1.0.5 (core)",
      "@oclif/plugin-update 4.1.3 (core)",
      "@oclif/plugin-version 2.0.4 (core)",
      "@oclif/plugin-warn-if-update-available 3.0.2 (core)",
      "@oclif/plugin-which 3.0.7 (core)",
      "@salesforce/cli 2.16.7 (core)",
      "apex 2.3.20 (core)",
      "auth 2.8.25 (core)",
      "data 2.6.1 (core)",
      "deploy-retrieve 1.19.3 (core)",
      "info 2.6.51 (core)",
      "limits 2.3.41 (core)",
      "login 1.2.40 (core)",
      "marketplace 0.3.2 (core)",
      "org 2.11.7 (core)",
      "schema 2.3.32 (core)",
      "settings 1.4.37 (core)",
      "sobject 0.2.14 (core)",
      "source 2.10.46 (core)",
      "telemetry 2.3.8 (core)",
      "templates 55.5.17 (core)",
      "trust 2.6.22 (core)",
      "user 2.3.41 (core)"
    ]
  }

Additional information

Downgrading to version 2.14.6 returned the proper output.

@cheyenneralston-ncino cheyenneralston-ncino added the investigating We're actively investigating this issue label Nov 8, 2023
@github-actions github-actions bot added the validated Version information for this issue has been validated label Nov 8, 2023
Copy link

github-actions bot commented Nov 8, 2023

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.

@mdonnalley mdonnalley added the bug Issue or pull request that identifies or fixes a bug label Nov 8, 2023
Copy link

git2gus bot commented Nov 8, 2023

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

@MarcDBehr
Copy link

Seeing something similar with the command "sf package version list -p package_name --json" results in:

undefined:2
These warnings can only be addressed by the owner(s) of @salesforce/plugin-packaging.
^
SyntaxError: Unexpected token 'T', "
These warn"... is not valid JSON
    at JSON.parse (<anonymous>)
    at Module.g

Salesforce version = @salesforce/cli/2.16.7 darwin-x64 node-v20.6.0 (on a Mac)

@warbio
Copy link

warbio commented Nov 10, 2023

Having the same issues. This is causing issues with our cicd pipelines.

These warnings can only be addressed by the owner(s) of @salesforce/plugin-packaging. We suggest that you create an issue at https://github.com/forcedotcom/cli/issues and ask the plugin owners to address them. Successfully installed @salesforce/plugin-packaging v1.27.0 { "status": 0, "result": { "Id": "<hidden>", "Status": "Success", "Package2Id": "<hidden>", "Package2VersionId": "<hidden>", "SubscriberPackageVersionId": "<hidden>", "Tag": null, "Branch": null, "Error": [], "CreatedDate": "2023-11-09 18:24", "HasMetadataRemoved": false, "CreatedBy": "<hidden>", "ConvertedFromVersionId": null }, "warnings": [] }

parse error: Invalid numeric literal at line 1, column 6

@shetzel
Copy link
Contributor

shetzel commented Nov 10, 2023

We're patching latest and latest-rc CLI releases to address this. Please stand by...

@shetzel
Copy link
Contributor

shetzel commented Nov 10, 2023

sf CLI v2.16.8 (latest) and sf CLI v2.17.11 (latest-rc) should have this fixed. Please reopen if you're still seeing the problem with these versions.

@shetzel shetzel closed this as completed Nov 10, 2023
@erocheleau
Copy link

@shetzel I am still seeing this behavior with CLI v2.16.8 for the community plugin

sf community create --target-org LWC --name "whatever" --url-path-prefix whatever --template-name "Build Your Own" --json

Output:

These warnings can only be addressed by the owner(s) of @salesforce/plugin-community.
We suggest that you create an issue at https://github.com/forcedotcom/cli/issues and ask the plugin owners to address them.


Successfully installed @salesforce/plugin-community v2.4.8
{
  "code": 1,
  "context": "CommunityCreateCommand",
  "commandName": "CommunityCreateCommand",
  ........

@shetzel shetzel reopened this Nov 10, 2023
@shetzel
Copy link
Contributor

shetzel commented Nov 10, 2023

Sorry, looks like we missed the success message. another patch coming asap...

@shetzel
Copy link
Contributor

shetzel commented Nov 11, 2023

We just published sf CLI v2.16.10 (latest) and sf CLI v2.17.13 (latest-rc) that fix this (for real). I just tested running this command and the files looked good:
sf package version list -v myHub -c 1 --json 2> list-stderr.json 1> list-stdout.json

I.e., list-stdout.json contained the correct, json-parseable content.

Let me know if it's not working for you and I'll reopen.

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

6 participants