Closed jasonmatos closed 3 weeks ago
sf version --verbose CLI Version: @salesforce/cli/2.62.6 published 21 days ago (Tue Oct 08 2024) (latest is 2.63.9)
Architecture: win32-x64
Node Version: node-v20.9.0
Plugin Version: @oclif/plugin-autocomplete 3.2.5 (core) @oclif/plugin-commands 4.1.3 (core) @oclif/plugin-help 6.2.14 (core) @oclif/plugin-not-found 3.2.22 (core) @oclif/plugin-plugins 5.4.14 (core) @oclif/plugin-search 1.2.11 (core) @oclif/plugin-update 4.6.3 (core) @oclif/plugin-version 2.2.14 (core) @oclif/plugin-warn-if-update-available 3.1.18 (core) @oclif/plugin-which 3.2.15 (core) @salesforce/cli 2.62.6 (core) apex 3.5.1 (core) api 1.3.1 (core) auth 3.6.65 (core) data 3.7.0 (core) deploy-retrieve 3.12.17 (core) info 3.4.9 (core) limits 3.3.32 (core) marketplace 1.2.26 (core) org 4.6.0 (core) packaging 2.8.11 (core) schema 3.3.34 (core) settings 2.3.23 (core) sobject 1.4.41 (core) source 3.5.21 (core) telemetry 3.6.15 (core) templates 56.3.22 (core) trust 3.7.33 (core) user 3.5.32 (core)
OS and Version: Windows_NT 10.0.19045
Shell: C:\Program Files\Git\usr\bin\bash.exe
Root Path: C:\Users[myUser]\AppData\Roaming\npm\node_modules\@salesforce\cli
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.
In Developer Tool found the following error :
INFO Started local extension host with pid 24320. workbench.desktop.main.js:sourcemap:660
WARN [mainThreadStorage] large extension state detected (extensionId: salesforce.salesforcedx-vscode-core, global: true): 613.0625kb. Consider to use 'storageUri' or 'globalStorageUri' to store this data on disk instead. workbench.desktop.main.js:sourcemap:97
[Extension Host] adding AppInsights reporter. workbench.desktop.main.js:sourcemap:660
INFO [perf] Render performance baseline is 13ms
I tried to following :
Can you try doing a complete clean of your extensions? Open a new Command Prompt window. Run %USERPROFILE%\.vscode\extensions
and for /d %i in (salesforce.salesforcedx*) do rmdir /s /q "%i"
, then reinstall the Salesforce Extension Pack.
I did open a new Command Prompt window.
Run cd %USERPROFILE%\.vscode\extensions
and for /d %i in (salesforce.salesforce*) do rmdir /s /q "%i"
Note : salesforce.salesforcedx, left salesforce.salesforce-vscode-slds-2.0.9 so changed to salesforce.salesforce
But same error when loading exting folder.
I also tried to create a brand new project using the following CLI command
sf project generate --name bug --template empty
I was able to get the extension loading I was able to authorize an org successfully
But the No Default Org Set was still visible in the bottom status bar
the sf org list
listed the org as Connected and as Default Org
Restarted VSCode Back to initial error where the extension not stuck in Activating
I assume you have already tried restarting your computer?
One more thing - In your VSCode Terminal, can you run these 4 commands in the Command Prompt and send us the results? I want to make sure you don't accidentally have multiple versions of the Salesforce CLI on your computer that conflict with each other.
sfdx --version
sf --version
where sfdx
where sf
Yes, I restarted the computer multiple time since I started having the issue. I'm not sure if it is linked with the version of VS Code or the Extensions.
I also tried to uninstall VSCode and reinstall it.
sfdx --version
@salesforce/cli/2.62.6 win32-x64 node-v20.9.0
sf --version
@salesforce/cli/2.62.6 win32-x64 node-v20.9.0
where sfdx
C:\Users\[myUser]\AppData\Roaming\npm\sfdx
C:\Users\[myUser]\AppData\Roaming\npm\sfdx.cmd
where sf
C:\Users\[myUser]\AppData\Roaming\npm\sf
C:\Users\[myUser]\AppData\Roaming\npm\sf.cmd
Salesforce CLI was installed with npm
node --version
v20.9.0
To help us diagnose the issue, can you go to your User settings and check that Salesforcedx-vscode-core › Telemetry: Enabled is enabled? Also, please set Salesforcedx-vscode-core: SF_LOG_LEVEL to "trace", the reload the VSCode window.
After you change the settings, please send us the following info:
The case where the CLI Integration extension does not activate: In your Output Tab, do you have a "Salesforce CLI" option in the dropdown? If yes, we would like the contents of that tab when the CLI Integration extension is stuck in "Activating" status.
The case where the CLI Integration extension activates but you are unable to authorize an org: What if you authorize an org using the CLI? Are you able to set the default the org that you just authorized in VSCode?
The case where the CLI Integration extension does not activate The Output for "Salesforce CLI" is empty
The Output for "Extension Host"
2024-10-30 15:50:21.666 [info] Extension host with pid 25480 started
2024-10-30 15:50:21.666 [info] Skipping acquiring lock for c:\Users\[MyUser]\AppData\Roaming\Code\User\workspaceStorage\1e4aaa1b9280a7df11812f8297aa74c1.
2024-10-30 15:50:21.781 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2024-10-30 15:50:21.784 [info] ExtensionService#_doActivateExtension salesforce.salesforcedx-vscode-core, startup: true, activationEvent: 'workspaceContains:sfdx-project.json', root cause: salesforce.salesforcedx-vscode-apex
2024-10-30 15:50:21.986 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2024-10-30 15:50:22.001 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2024-10-30 15:50:22.036 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-10-30 15:50:31.732 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-10-30 15:50:31.738 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
The case where the CLI Integration extension activates but you are unable to authorize an org Deleting the .sf and .sfdx folders of the projet and reloading the VSCode window seems to make the extension activate The Output for "Salesforce CLI"
Starting SFDX: Refresh SObject Definitions
15:58:41.21 sf sobject definitions refresh
Unable to process sObjects when not in a SFDX Project c:\Users\[MyUser]\bug\.sfdx
15:58:41.22 sf sobject definitions refresh
ended with error Unable to process sObjects when not in a SFDX Project c:\Users\[MyUser]\bug\.sfdx
15:58:41.22 sf sobject definitions refresh
ended with exit code 1
As for the default org, not even running the authentication via command line does not update the Default Org in VSCode.
Running the following CLI command
sf org login web --instance-url https://[myDomain].sandbox.my.salesforce.com --set-default -a Demo
OR
sf config set target-org Demo
In both case, the following output was displayed in the Developer Tool :
[Extension Host] Project is not for ISV Debugger
console.ts:137 [Extension Host] Deleted environment variables SF_TARGET_ORG and SF_ORG_INSTANCE_URL
hi @jasonmatos, after auth, if you check .sf/config.json
or .sfdx/sfdx-config.json
files, do you see your org set there?
After verifying, Can you manually try to set your default org with command SFDX: Set a Default Org from command palette?
Hi @CristiCanizales yes after Auth using either method CLI commands the both .sf/config.json
and .sfdx/sfdx-config.json
files were created.
But using the command pallet SFDX: Set a Default Org
.sf/config.json
and .sfdx/sfdx-config.json
are not beeing created or updated08:39:53.468 Starting SFDX: Set a Default Org
sf org list
does not list the sandbox as Default OrgBasically this command pallet does nothing
Note : I notice that by removing both .sf/config.json
and .sfdx/sfdx-config.json
makes the extesion start successfully after a restart of VsCode.
Hi @jasonmatos, Thank you for sharing this info. We'd like to check our telemetry to see if we can get some insights from there. Can I assume you already followed the steps in my previous message to check Salesforcedx-vscode-core › Telemetry: Enabled and set Salesforcedx-vscode-core: SF_LOG_LEVEL to "trace"? In addition to those, there's one more thing that would help us a lot: set Salesforcedx-vscode-core: Telemetry-tag to a unique value and let us know what you set it to - that way we can filter our telemetry entries to only yours.
Hi @daphne-sfdc, Yes indeed the setting were set as requested. I set the Telemetry-tag to jasonmatos5929
I guess I need to redo the step so you get the info.
Yes, please redo the step and let me know when you are done.
The 2 scenarios were redone yesterday around 1030h-1040h and were redone today around 0920h-0930h
Thank you. I'll check the telemetry and let you know what I find.
Interesting... I was not able to find telemetry for either of your redos. I ran the same commands and was able to find telemetry for myself. It's ok, we can continue diagnosing from here.
You previously said "The Popup Running SFDX: Set a Default Org shows up and stays there forever".
Hi @daphne-sfdc I think you should now see the Telemetry. I had to Developer : Set Log Level... to Trace in VsCode first everytime I start VsCode as well. Now I see an Telemetry element in the Ouput tab with some
What kind of org are you using? Im trying to connect to a simple Developer Sandbox from an Enterprise Edition. I also tried an Trailhead playground with the same result.
Does it matter which org you try to set as the default? Are you getting the error with all orgs, or are you able to set some orgs as the default but not others? Yes I'm gettting the same behavior with all types of org or different org.
This morning, Im not sure how I got an salesforce.salesforcedx-vscode-core-unresponsive.cpuprofile.txt salesforce.salesforcedx-vscode-core-unresponsive.cpuprofile.txt
I still don't see any telemetry for the telemetry tag jasonmatos5929
. I have seen the unresponsive CPU profile error before in my Windows VM. It always went away when I reloaded the VSCode window.
@daphne-sfdc It seems there was an issue with VsCode itself. I followed the steps from VsCode for an Clean uninstall without uninstalling it (https://code.visualstudio.com/docs/setup/uninstall)
Clean uninstall If you want to remove all user data after uninstalling VS Code, you can delete the user data folders Code and .vscode. This will return you to the state before you installed VS Code. This can also be used to reset all settings if you don't want to uninstall VS Code.
The folder locations will vary depending on your platform:
Windows - Delete %APPDATA%\Code
and %USERPROFILE%\.vscode
.
I re-installed the Salesforce extension and everything started working again.
Thank you for your time.
Thank you for the update and for sharing your solution - today I learned something new. 😀 I'm very happy to hear that you were able to resolve the issue and get yourself unblocked!
Summary
Salesforce extensions fail to load/activate when opening existing project
Steps To Reproduce:
Expected result
See the SFDX: Deploy source in Manifest to Org and SFDX: Retrieve Source in Manifest from Org
Actual result
The menu option are not available.
Additional information
Salesforce Extension Version in VS Code: 62.2.0 Salesforce CLI Version: 2.62.8 OS and version: Windows 10 Entreprise 22H2 VS Code version: 1.92.2
"Developer: Show Running Extensions"
"Developer: Startup Performance" Startup Performance.txt