forcedotcom / salesforcedx-vscode

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

SFDX Retrieve is taking forever for LWC and Apex #5383

Closed mrinalsharma736 closed 7 months ago

mrinalsharma736 commented 8 months ago

Summary

Short summary of what is going on or to provide context.

Steps To Reproduce:

  1. Create SFDX project in VScode
  2. Use manifest file to retrieve Apex or LWC or simply click on any existing LWC/Apex and right click and click on 'SFDX: Retrieve Source from Org'
  3. Jobs starts

Expected result : Component should be retrieved within seconds

Actual result : takes more than 30 minutes

Additional information

Salesforce Extension Version in VS Code: v59.15.0

SFDX CLI Version: 2.25.7

OS and version: MacOS - 14.2.1 (23C71)

VS Code version: 1.85.2

daphne-sfdc commented 8 months ago

@daphne-sfdc Hi, We are also facing the same issue since last week. We are using Mac OS. is there any workaround you have for mac users?

Extension 58.14.1 and CLI 2.22.2 doesn't work for us.

Hi @mrinalsharma736, Got it. Since downgrading was not a usable workaround, please upgrade your extensions and CLI back to the latest version.

I see you have already found #4865, our long-running thread on this slow deployment/retrieval issue. I'm going to assume you created this new issue because you have already tried all the OS-agnostic workarounds that our team proposed in that thread and none of them worked for you. (If that is not the case, please go through that thread and try all the workarounds.)

At this point, I'm going to collect some info to help my team diagnose the issue. My first question: What happens if you run your retrieve using the CLI in the Terminal instead of using the VSCode command? Do you also see this slow retrieval time using the CLI? (The CLI command is sf project retrieve start --source-dir=<path to your file> --target-org=<your org username or alias>) I'm asking because the VSCode extensions and the CLI use a set of shared libraries for deploy/retrieve, and I'd like to know if the issue is in the extensions or the shared libraries.

github-actions[bot] commented 8 months ago

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

mrinalsharma736 commented 8 months ago

Hi I tried above command, but getting below error Preparing retrieve request... Error Error (1): This directory does not contain a valid Salesforce DX project.

daphne-sfdc commented 8 months ago

@mrinalsharma736 When you did the retrieve, did you first cd to the folder that contains your Salesforce project? You should run the retrieve in the root directory of your project.

github-actions[bot] commented 8 months ago

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