salesforcedx-vscode
salesforcedx-vscode copied to clipboard
Refresh SObject Definitions hangs infinitely with no errors
Summary
When I select "SFDX: Refresh SObject Definitions" from the command palette, it appears to start but nothing happens for multiple hours.
Steps To Reproduce:
- Sign in to Developer Org
- Check that the connection works by selecting "SFDX: Deploy This Source to Org" for example
- Select "SFDX: Refresh SObject Definitions"
Expected result
The SObject definitions should be refreshed
Actual result
Nothing. The progress bar is shown forever (tested 15 hours) along with the following messages:
Starting SFDX: Refresh SObject Definitions
11:31:20.184 sfdx sobject definitions refresh
Additional information
Salesforce Extension Version in VS Code: v55.4.1
SFDX CLI Version: sfdx-cli/7.159.0 darwin-x64 node-v16.15.1
OS and version: macOS 12.4
Related but different issues:
#4093 - shows error "Failure performing sObject describe aborted"
#3056 - shows error "Cannot read property 'forEach' of undefined"
#2802 - shows error "command 'sfdx.force.internal.refreshsobjects' not found". Also, running sfdx force:schema:sobject:list -c all
worked fine but did not resolve the issue.
#3679 - shows error "Cannot convert undefined or null to object" and result was to contact Salesforce support. https://github.com/forcedotcom/salesforcedx-vscode/issues/3679#issuecomment-985047577 but I'm not sure if I can do that because I don't have any support relationship with Salesforce.
Is there any command that I can run on the CLI to do the same job? When I run sfdx sobject definitions refresh
I get "Warning: sobject is not a sfdx command."
Hi @mjaggard how large is the org that you're working with, in terms of classes, objects, etc that you're hoping to retrieve? Are you seeing anything retrieved under .sfdx/tools/
in that time? Unfortunately this is an extensions-specific command, so you'll have to run it through VS Code. Have you tried re-authenticating to the org that you're working with as well?
@randi274 thanks for the reply. I have tried re-authenticating but that didn't help. I've also looked in .sfdx/tools/sobjects and I seem to have some standardObject files there but it doesn't update when I run the refresh.
I have 26 custom objects, 12 triggers, 174 classes, 66 visualforce pages. Does that help?
I am able to see the same behavior on my machine, running macOS 12.5. We'll create a work item to look into this. Thanks for reporting, @mjaggard.
This issue has been linked to a new work item: W-11587594
Seeing the same thing on macOS Version 13.0 Beta (22A5358e)
@mjaggard, I was able to resolve it by removing the '.sfdx' directory, closing VS Code, opening, and running 'SFDX: Authorize an Org'.
Thanks for sharing your solution @KipperBush! @mjaggard does that workaround happen to work for you as well?
Came across this whilst searching for solutions to the same issue.
MacOS 12.1 Visual Studio Code 1.72.0 sfdx-cli/7.167.2 darwin-x64 node-v16.17.0
The steps suggested by @KipperBush did solve the issue for me. I'll keep an eye to see if it reoccurs
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted.