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 org list intermittently prints nothing #2557

Closed
kyle-blair opened this issue Nov 7, 2023 · 4 comments
Closed

sf org list intermittently prints nothing #2557

kyle-blair opened this issue Nov 7, 2023 · 4 comments
Labels
area:jsforce investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated

Comments

@kyle-blair
Copy link

Summary

The sf org list command frequently (maybe > 50% of the time) prints no output. Other times it works correctly. Looking through the --dev-debug output shows various network issues such as 502 notresolvable and

https-proxy-agent:parse-proxy-response onerror Error: read ECONNRESET     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } +0ms

Additionally, when the command prints no output and clearly does not run in a successful manner, the exit code is still 0, incorrectly indicating success.

Steps To Reproduce

  1. Run sf org list.
  2. Repeat 1 until the command prints no output.

Expected result

The command always provides output. Output is either the requested list of orgs or an error indicating what went wrong. The return status of the command should be 0 for success and not zero for failure.

Actual result

Some of the time, the command prints nothing. When nothing is printed, the exit code is 0, indicating success.

System Information

{
  "architecture": "darwin-x64",
  "cliVersion": "@salesforce/cli/2.15.9",
  "nodeVersion": "node-v18.17.1",
  "osVersion": "Darwin 22.6.0",
  "rootPath": "/Users/user/.nvm/versions/node/v18.17.1/lib/node_modules/@salesforce/cli",
  "shell": "bash",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 2.3.10 (core)",
    "@oclif/plugin-commands 3.0.4 (core)",
    "@oclif/plugin-help 6.0.4 (core)",
    "@oclif/plugin-not-found 3.0.2 (core)",
    "@oclif/plugin-plugins 3.9.4 (core)",
    "@oclif/plugin-search 1.0.4 (core)",
    "@oclif/plugin-update 4.1.3 (core)",
    "@oclif/plugin-version 2.0.3 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.2 (core)",
    "@oclif/plugin-which 3.0.6 (core)",
    "@salesforce/cli 2.15.9 (core)",
    "apex 2.3.20 (core)",
    "auth 2.8.25 (core)",
    "community 2.4.6 (user)",
    "custom-metadata 2.2.8 (user)",
    "data 2.6.1 (core)",
    "deploy-retrieve 1.19.2 (core)",
    "info 2.6.51 (core)",
    "limits 2.3.41 (core)",
    "login 1.2.39 (core)",
    "marketplace 0.3.1 (core)",
    "org 2.11.5 (core)",
    "packaging 1.26.4 (user)",
    "schema 2.3.31 (core)",
    "settings 1.4.36 (core)",
    "sobject 0.2.14 (core)",
    "source 2.10.45 (core)",
    "telemetry 2.3.8 (core)",
    "templates 55.5.17 (core)",
    "trust 2.6.22 (core)",
    "user 2.3.39 (core)",
    "sfdmu 4.30.0 (user)"
  ]
}
@kyle-blair kyle-blair added the investigating We're actively investigating this issue label Nov 7, 2023
@github-actions github-actions bot added the validated Version information for this issue has been validated label Nov 7, 2023
Copy link

github-actions bot commented Nov 7, 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.

@shetzel
Copy link
Contributor

shetzel commented Nov 13, 2023

@kyle-blair - can you please grab a stack trace so I can make this fail in a similar way? I can run sf org list all day and it's fine so I'll have to force an error in a similar place if possible.

@shetzel shetzel added the more information required Issue requires more information or a response from the customer label Nov 13, 2023
@kyle-blair
Copy link
Author

The full logs have more information than I'm willing to share and redacting is a pain. Let me know if this snippet helps. Looks like it's failing in the node TCP stack.

  agent-base Resolving socket for 'https:' request: 'GET /services/data/v50.0' +3ms
  https-proxy-agent:agent Creating `net.Socket`: { protocol: 'http:', slashes: true, auth: null, host: 'proxy.company.com', port: 80, hostname: 'proxy.company.com', hash: null, search: null, query: null, href: 'http://proxy.company.com/' } +1ms
  https-proxy-agent:parse-proxy-response onerror Error: read ECONNRESET     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } +1ms
  https-proxy-agent:parse-proxy-response onerror Error: read ECONNRESET     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } +0ms
  https-proxy-agent:parse-proxy-response onerror Error: read ECONNRESET     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } +12ms
  https-proxy-agent:parse-proxy-response onerror Error: read ECONNRESET     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } +1ms
  https-proxy-agent:parse-proxy-response onerror Error: read ECONNRESET     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } +0ms
[11:19:55.497] WARN (sf:connection):
    0: "Failed to set the latest API version:"
    1: {
      "message": "request to https://sandbox.sandbox.my.salesforce.com/services/data failed, reason: read ECONNRESET",
      "type": "system",
      "errno": "ECONNRESET",
      "code": "ECONNRESET"
    }

@mshanemc
Copy link
Contributor

Thanks for the trace @kyle-blair.

I'm going to mark this as a duplicate of #1350 (there was no way for you to know that, but it's the same underlying cause that we need to fix in jsforce)

@mshanemc mshanemc closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:jsforce investigating We're actively investigating this issue more information required Issue requires more information or a response from the customer validated Version information for this issue has been validated
Projects
None yet
Development

No branches or pull requests

3 participants