forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 406 forks source link

SFDX retrieve /deploy commands failing with run after installing latest CLI version and VS Code Extension #5569

Closed Crysis2015 closed 6 months ago

Crysis2015 commented 6 months ago

Note Before you submit your issue, make sure that:

  • You're using the latest version of Salesforce CLI.
  • You've searched both open and closed issues for related posts.
  • You've used the doctor command to diagnose common issues.
  • You understand that GitHub Issues don't adhere to any agreement or SLA.
    • If you require immediate assistance, use official channels such as Salesforce Customer Support.

Summary

Installed latest CLI for Windows. Installed latest version of VS Code and Salesforce extension. After this, essentially all commands are failing with ECONNRESET. Just the org authorize command is running.

Repaired Windows, reinstalled VS Code , setup everything from fresh multiple times, setup new project for sandbox(non scratch org).

None of this solves the issue.

Steps To Reproduce

IMPORTANT Provide a repository that's configured to reproduce the issue. If you are unable to provide a repo, please explain why not. The more info we have from the start, the faster we can resolve your issue. We may close your issue if you don't include proper instructions.

  • Generate a project with sf project generate or fork dreamhouse-lwc.
  • Provide detailed step-by-step instructions on how to reproduce the issue.

Create a project in VS Code for any sandbox org. Authorize the org. This will work. After that try deploying/retrieving.

Expected result

Deploy/retrieve should work fine.

Actual result

Deploy/retrieve failing with request to https://xxxxxx--xxxxxx.sandbox.my.salesforce.com/services/data/v59.0/tooling/sobjects/SourceMember/describe failed, reason: read ECONNRESET

Output of sfdx doctor command is also attached.

System Information

zsh , powershell , cmd
{
  "architecture": "win32-x64",
  "cliVersion": "@salesforce/cli/2.39.6",
  "nodeVersion": "node-v20.12.2",
  "osVersion": "Windows_NT 10.0.22631",
  "rootPath": "C:\\Program Files\\sf\\client",
  "shell": "cmd.exe",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.0.16 (core)",
    "@oclif/plugin-commands 3.3.1 (core)",
    "@oclif/plugin-help 6.0.21 (core)",
    "@oclif/plugin-not-found 3.1.6 (core)",
    "@oclif/plugin-plugins 5.0.14 (core)",
    "@oclif/plugin-search 1.0.23 (core)",
    "@oclif/plugin-update 4.2.7 (core)",
    "@oclif/plugin-version 2.0.17 (core)",
    "@oclif/plugin-warn-if-update-available 3.0.15 (core)",
    "@oclif/plugin-which 3.1.8 (core)",
    "@salesforce/cli 2.39.6 (core)",
    "apex 3.1.9 (core)",
    "auth 3.6.3 (core)",
    "data 3.3.2 (core)",
    "deploy-retrieve 3.6.6 (core)",
    "info 3.2.3 (core)",
    "limits 3.3.4 (core)",
    "marketplace 1.2.4 (core)",
    "org 4.1.3 (core)",
    "packaging 2.4.0 (core)",
    "schema 3.3.4 (core)",
    "settings 2.2.1 (core)",
    "sobject 1.3.6 (core)",
    "source 3.3.3 (core)",
    "telemetry 3.3.4 (core)",
    "templates 56.2.4 (core)",
    "trust 3.6.6 (core)",
    "user 3.5.2 (core)"
  ]
}

Additional information

Screenshot 2024-05-03 011702 Screenshot 2024-05-03 011535 Screenshot 2024-05-03 011534

1714678596167-diagnosis.json 1714678632578-diagnosis.json

github-actions[bot] commented 6 months ago

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 commented 6 months ago

ECONNRESET typically indicates that you have a connection issue. Are you able to share the debug logs (using --dev-debug)?Something in there might help understand why the connection is closing unexpectedly.

Installed latest CLI for Windows. Installed latest version of VS Code and Salesforce extension. After this, essentially all commands are failing with ECONNRESET.

Is this only happening on the latest version? Or is there an older version where this error isn't happening?

Crysis2015 commented 6 months ago

No this started happening pretty recently since the last few days if I remember. Older versions does not seem to have the problem. This is happening from the VS Code extension commands. If I run CLI commands manually in the terminal, it does not seem to have the issue.

mingxuanzhangsfdx commented 6 months ago

Hi @Crysis2015 -

Can you send us any error messages you see in the following places?

  1. Problems tab
  2. Output tab under the Salesforce CLI dropdown option
  3. Run Developer: Toggle Developer Tools from the command palette
Crysis2015 commented 6 months ago

@mingxuanzhangsfdx All other areas are blank except the Developer tools console. Attached screenshot of console. Screenshot 2024-05-04 232158

No network requests went out.

peternhale commented 6 months ago

@Crysis2015 could you run this command against the org above for me and return the resulting files

sf doctor -c "sf sobject describe -s SourceMember -t --target-org [username]"
Crysis2015 commented 6 months ago

@peternhale Attached all the files output. FYI , I get this error for all my regular orgs which does not have source tracking . I do not have a setup with scratch orgs so cant confirm the behavior there.

1715000564455-command-debug.log 1715000564455-command-stdout.log 1715000564455-diagnosis.json

peternhale commented 6 months ago

@Crysis2015 Would you try these steps to gather some additional info.

Crysis2015 commented 6 months ago

@peternhale I tried these steps, but nothing was generated in .sf or any folder. No log files at all. Screenshot 2024-05-07 195408

peternhale commented 6 months ago

@Crysis2015 the log file will be in your home directory under .sf folder

Crysis2015 commented 6 months ago

@peternhale Please find attached the log file sf-2024-05-08.log

Crysis2015 commented 6 months ago

one observation this seems like a windows problem. I was able to check on a mac and there it is working fine.

peternhale commented 6 months ago

@Crysis2015 thanks for the clue and I don't see anything bad in the log file you provided. Can I assume that the mac and windows box are on the same network, or am I mistaken?

Crysis2015 commented 6 months ago

@peternhale Yup the network is not an issue as all of them are working. I checked the firewall, antivirus ,vpn check, all are fine. And I tried on different networks as well but the windows setup shows the same failure whereas the mac setup works fine.

Crysis2015 commented 6 months ago

@peternhale Just a question, is it replicable from your side?

peternhale commented 6 months ago

@Crysis2015 I am unable to reproduce on windows and my Mac works too. Similar setup on network as well (VPN). Would you be willing to completely remove vscode and start from scratch on your windows machine?

courtneyejward commented 6 months ago

Hello, this is happening to me on a Mac. No details provided other than the SFDX retrieve command has failed. I've tried reinstalling VS code, reinstalling the extensions, as well as installing older versions of CLI, but nothing lets me retrieve the metadata. Not sure if this information is useful but when I try to use an older version of the extension, I see the message "no view is registered with id: sfdx.tasks.view"

github-actions[bot] commented 6 months ago

This issue has not received a response in 3 days. It will auto-close in 2 days unless a response is posted.