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

Failure performing refresh sObject describe request #5538

Open Logesh-Manavalan opened 5 months ago

Logesh-Manavalan commented 5 months ago

Summary

I'm getting error when I'm trying to run refresh sObject describe request in my developer org. The error message is: 12:17:13.878 sf sobject definitions refresh Failure performing sObject describe request to https://d5g000007oizmea2-dev-ed.my.salesforce.com/services/data/v57.0/composite/batch failed, reason: connect ETIMEDOUT 101.53.163.118:443 12:17:36.242 sf sobject definitions refresh ended with error Failure performing sObject describe request to https://d5g000007oizmea2-dev-ed.my.salesforce.com/services/data/v57.0/composite/batch failed, reason: connect ETIMEDOUT 101.53.163.118:443

Steps To Reproduce:

1.Connect SFDX cli and Salesforce Extension pack to a developer edition org 2.Run SFDX Refresh SObject definitions (there is now a new menu for all objects, custom or standard - for me all fail)

Expected result

The SObject definitions are refreshed

Actual result

The command failed.

Additional information

Screenshot 2024-04-14 122229

Salesforce Extension Version in VS Code: v60.8.0

SFDX CLI Version: image

OS and version: Windows 11 22631.3447

VS Code version: 1.85.1

diyer commented 5 months ago

@Logesh-Manavalan we have deprecated sfdx cli as of VSCode extensions version 60.7.0 We had informed all the users of this change more than a month ago.
Users are now required to install the latest version of sf cli to use Salesforce extensions. Let us know if you have any follow up questions.

Logesh-Manavalan commented 5 months ago

@Logesh-Manavalan we have deprecated sfdx cli as of VSCode extensions version 60.7.0 We had informed all the users of this change more than a month ago. Users are now required to install the latest version of sf cli to use Salesforce extensions. Let us know if you have any follow up questions.

@diyer I tried updating to the latest sf version, but still facing the same issue. image Please find the screenshot for the same error below post the update: image

peternhale commented 5 months ago

@Logesh-Manavalan based on the latest version info you supplied, you need to update to Salesforce CLI version 2. The cli sf v1 is also no longer supported.

Please see Move from sfdx (v7) to sf (v2) for instructions.

Logesh-Manavalan commented 5 months ago

@peternhale I've updated to sf V2, but still getting the same issue. image

image

peternhale commented 5 months ago

@Logesh-Manavalan thank you for doing the migration. Could you share:

Logesh-Manavalan commented 5 months ago

@peternhale Please find the below requested details:

peternhale commented 5 months ago

@Logesh-Manavalan Given the error reported is the sobject describe, could you try running this command using one of your custom objects.

In a command prompt terminal run sf sobject describe -s [name of your custom object]

Logesh-Manavalan commented 5 months ago

@peternhale Got some kind of metadata response on running the above command. image

peternhale commented 5 months ago

@Logesh-Manavalan That's good news. Next I would like you to enable debug logging and then run the refresh sobjects again.

One can enable setting SF_LOG_LEVEL in vscode workspace settings so that CLI and Library commands (SDR, apex-node, etc) are configured to emit log messages at the configured level. This is useful to get data from CLI/Libraries during run time.

Logesh-Manavalan commented 5 months ago

@peternhale I don't see any logs getting created. image

peternhale commented 5 months ago

@Logesh-Manavalan there is .sf folder in your HOME directory, which is where the log files are stored.

Logesh-Manavalan commented 5 months ago

sf-2024-04-15.log @peternhale Got it, Attaching the log file for your reference.

peternhale commented 5 months ago

@Logesh-Manavalan when you are running refresh sobjects, which option are you selecting, All, Standard or Custom. If it is All, could you try with just custom?

Logesh-Manavalan commented 5 months ago

@peternhale Thanks for the suggestion. The refresh sobjects command executes successfully when I select 'Custom Objects'. But it fails with the same error when I try to do the same with Standard objects, any reason?

peternhale commented 5 months ago

@Logesh-Manavalan I just wanted to see of reducing the scope of the refresh would change the outcome. I do not run into this error while using my test org.

Could you confirm the number of standard sobjects present in your org by running sf sobject list --sobject standard > sobjeccts.txt.

Logesh-Manavalan commented 5 months ago

@peternhale I got 1221 objects when I ran the above command.

peternhale commented 5 months ago

@Logesh-Manavalan would you share the list?

Logesh-Manavalan commented 5 months ago

sobjeccts.txt @peternhale Please find the above file for your reference.

peternhale commented 5 months ago

@Logesh-Manavalan thank for the list of sobjects.

peternhale commented 5 months ago

@Logesh-Manavalan does your have any particular Salesforce licenses or Salesforce packages installed. Just looking for a way to easily reproduce the timeout you are seeing.

peternhale commented 5 months ago

@Logesh-Manavalan I am going to create a bug so that we can spend a bit more time investigating this issue.

I pushed my org so that it has more std sobjects than you have, but I still cannot force an error, so does not seem to be a problem with the number of sobjects.

git2gus[bot] commented 5 months ago

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

Logesh-Manavalan commented 5 months ago

@peternhale Any action item required from my side?

peternhale commented 5 months ago

@Logesh-Manavalan is this issue blocking your productivity, given you can a least fetch your custom objects?

Logesh-Manavalan commented 5 months ago

@peternhale There is no issue with my productivity. Please let me know when there is an update on this bug.

peternhale commented 5 months ago

@Logesh-Manavalan one more question, if you do not mind. How long does it take to reach the failure case? We are using the composite rest api to bundle 25 individual sobject describes into a batch. The composite batch has a hard timeout of 10 minutes. Having the time to failure will help me pursue different root causes.

Logesh-Manavalan commented 5 months ago

@peternhale It takes around 25-35 seconds for the failure to occur.

peternhale commented 5 months ago

Thank you!