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

Intermittent Error with sf project retrieve start Command #2965

Closed
Alfystar opened this issue Jul 23, 2024 · 8 comments
Closed

Intermittent Error with sf project retrieve start Command #2965

Alfystar opened this issue Jul 23, 2024 · 8 comments
Labels
bug Issue or pull request that identifies or fixes a bug validated Version information for this issue has been validated

Comments

@Alfystar
Copy link

Summary

Steps To Reproduce

Hello,

I’m encountering an intermittent issue when running the sf project retrieve start command. Occasionally, I receive the following error, but if I retry the command, it executes successfully without any issues:

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                                                                                                                                                ┃
┃ $> sf project retrieve start --target-org PreProd --ignore-conflicts --manifest fullRetrieveArtifact/package_ApexClass_51.xml --output-dir fullRetrieveArtifact/retrievePack/dir_51 --wait 240 ┃
┃ [ApexClass_51] Error command execution:                                                                                                                                                        ┃
┃ (node:17933) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.            ┃
┃ (Use `node --trace-warnings ...` to show where the warning was created)                                                                                                                        ┃
┃ Error (2): Parsing --target-org                                                                                                                                                                ┃
┃   Unexpected end of JSON input                                                                                                                                                                 ┃
┃ See more help with --help                                                                                                                                                                      ┃
┃                                                                                                                                                                                                ┃
┃                                                                                                                                                                                                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

As you can see the error: Unexpected end of JSON input is strange for a cli command

Expected result

The command should execute successfully on the first attempt without any errors.

Actual result

Some times fail and when i retry work well

System Information

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.50.6",
  "nodeVersion": "node-v20.15.0",
  "osVersion": "Darwin 23.5.0",
  "rootPath": "/Users/ea_enel/.local/share/sf/client/2.50.6-6e9d7f7",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.1.6 (core)",
    "@oclif/plugin-commands 4.0.6 (core)",
    "@oclif/plugin-help 6.2.5 (core)",
    "@oclif/plugin-not-found 3.2.10 (core)",
    "@oclif/plugin-plugins 5.3.4 (core)",
    "@oclif/plugin-search 1.2.2 (core)",
    "@oclif/plugin-update 4.4.7 (core)",
    "@oclif/plugin-version 2.2.6 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.8 (core)",
    "@oclif/plugin-which 3.2.6 (core)",
    "@salesforce/cli 2.50.6 (core)",
    "apex 3.2.4 (core)",
    "auth 3.6.33 (core)",
    "data 3.5.5 (core)",
    "deploy-retrieve 3.9.13 (core)",
    "info 3.3.17 (core)",
    "limits 3.3.17 (core)",
    "marketplace 1.2.17 (core)",
    "org 4.3.4 (core)",
    "packaging 2.7.0 (core)",
    "schema 3.3.19 (core)",
    "settings 2.3.8 (core)",
    "sobject 1.4.19 (core)",
    "source 3.5.3 (core)",
    "telemetry 3.6.1 (core)",
    "templates 56.3.2 (core)",
    "trust 3.7.13 (core)",
    "user 3.5.17 (core)",
    "sfdx-plugin-source-read 1.2.0 (user) published 272 days ago (Tue Oct 24 2023)"
  ]
}

Thanks a lot!

@Alfystar Alfystar added the investigating We're actively investigating this issue label Jul 23, 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 Jul 23, 2024
@mshanemc
Copy link
Contributor

there's several json file that's read for authing to that org.
~/.sfdx/<username>.json
~/,.sfdx/alias.json (since you used an alias PreProd)

I'd guess that one of those has something wrong with it when you see this happen. I don't have a good explanation for the intermittent part though. Next time it happens, take a peek at the file to see if there's something obvious about it.

@mshanemc mshanemc added the more information required Issue requires more information or a response from the customer label Jul 23, 2024
@Alfystar
Copy link
Author

I don't know if it can help to understand the situation, but I think it's important to add that I was doing parallel retrieves using python.
Could it be that inside the cli the file is whitened and then recreated?

@mshanemc
Copy link
Contributor

I don't know if it can help to understand the situation, but I think it's important to add that I was doing parallel retrieves using python.

that's likely the problem.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label Jul 24, 2024
Copy link

git2gus bot commented Jul 24, 2024

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

@mdonnalley mdonnalley removed more information required Issue requires more information or a response from the customer investigating We're actively investigating this issue labels Jul 24, 2024
@Alfystar
Copy link
Author

Received, next time it comes up I'll do a more in-depth analysis

@mshanemc
Copy link
Contributor

mshanemc commented Aug 8, 2024

hey, I think we found a way to replicate this and have a fix for it. It went out in the nightly 2.55.0

@iowillhoit
Copy link
Contributor

This is now in latest

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 validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

4 participants