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:Create Project with Manifest resulted in error #4252

Closed ronika-das closed 1 year ago

ronika-das commented 2 years ago

Summary

Hi Team. All of a sudden, the Salesforce Extension pack is not working. When I try to create a new SFDX Project With Manifest, the below errors is thrown sfdx.force.project.with.manifest.create' not found

Steps To Reproduce:

1.1 Open Command Pallete->Create SFDX Project With Manifest

Expected result

It should allow us to choose the type and location to create the new project.

Actual result

Getting the error prompt, image

Additional information

I could not find a similar issues here, if there is any and it has been resolved. Pls share here I do not feel this is a Salesforce CLI issue, as the sfdx command are working fine on the terminal.

Java Version: java 17.0.3.1 2022-04-22 LTS Salesforce Extension Version in VS Code:v55.3.0

SFDX CLI Version:sfdx-cli/7.157.0 win32-x64 node-v16.15.1

OS and version:Windows 10, 20H2

Sainath-Attuluri commented 2 years ago

Am facing the same issues, SFDX CLI extraction required packs installed. and Am trying to create the New project click Ctrl+Shift+P got above mention error. And trying to use the existing folder and retiring but with the same error. How to solve this error. Please update ASAP.

gbockus-sf commented 2 years ago

Howdy, I tried to repo this on Mac and Windows without success.
I just updated the extensions this morning and refreshed VSCode.

This kind of error typically indicates there is an issue with the extensions on install. It could have been a hiccup with the vscode marketplace that has been resolved.

The only difference between my machine and yours is mine is using OS: Windows 10, 21H2 but I wouldn't think that would make any difference. Could you try removing the extensions and reinstalling and see if the issue persists?

ronika-das commented 2 years ago

@gbockus-sf Thank you for your reply. We did try that

  1. Updated everything to latest version, ensuring environment variables are updated
  2. Uninstalled vscode, salesforce cli and java, then reinstalled back

I am still trying. The sfdx commands are working fine on the terminal. But the Salesforce extension pack doesn't load up, even for existing sfdx projects.

Githubbhara commented 2 years ago

Same issue i have been facing here. Tried with all possibilities like Uninstall and install JRE, JDK, vsc, Salesforce extension pack, cli and luck so far. Still facing the above mentioned error.

gbockus-sf commented 2 years ago

Hum. Very strange. I had @randi274 also try it on her windows box and she was also unable to reproduce. Could you please share the output from ls ~/.vscode/extensions

Also if possible zip up ~/.vscode/extensions/salesforce.salesforcedx-vscode-core-55.3.0 and attach it here? Bonus: code --list-extensions output

ronika-das commented 2 years ago

Hi all. PLs find the output as follows

ls ~/.vscode/extensions
ls vscode.txt

~/.vscode/extensions/salesforce.salesforcedx-vscode-core-55.3.0 resources.zip

code --list-extensions extensions.txt

Sainath-Attuluri commented 2 years ago

Hi Team,

As per the above comments run the and below is the info.

1) ls ~/.vscode/extensions : User Name MINGW64 ~/Desktop/Vscode_Git/0504 $ ls ~/.vscode/extensions chuckjonas.apex-pmd-0.5.9/ salesforce.salesforcedx-vscode-apex-debugger-55.3.0/
dbaeumer.vscode-eslint-2.2.6/ salesforce.salesforcedx-vscode-apex-replay-debugger-55.3.0/ esbenp.prettier-vscode-9.5.0/ salesforce.salesforcedx-vscode-core-55.3.0/ financialforce.lana-1.4.2/ salesforce.salesforcedx-vscode-expanded-55.3.0/ ms-vscode.js-debug-companion-1.0.18/ salesforce.salesforcedx-vscode-lightning-55.3.0/ redhat.vscode-xml-0.21.2022062916-win32-ia32/ salesforce.salesforcedx-vscode-lwc-55.3.0/ salesforce.analyticsdx-vscode-0.8.2/ salesforce.salesforcedx-vscode-soql-55.3.0/ salesforce.analyticsdx-vscode-core-0.8.2/ salesforce.salesforcedx-vscode-visualforce-55.3.0/ salesforce.analyticsdx-vscode-templates-0.8.2/ salesforce.salesforce-vscode-slds-1.4.8/ salesforce.salesforcedx-vscode-55.3.0/ vibd.sfdx-cli-0.0.1/ salesforce.salesforcedx-vscode-apex-55.3.0/

2) ~/.vscode/extensions/salesforce.salesforcedx-vscode-core-55.3.0 : User Name ~/Desktop/Vscode_Git/0504 $ ~/.vscode/extensions/salesforce.salesforcedx-vscode-core-55.3.0 bash: /c/Users/sainath_attuluri/.vscode/extensions/salesforce.salesforcedx-vscode-core-55.3.0: Is a directory

3) code --list-extensions: User Name MINGW64 ~/Desktop/Vscode_Git/0504 $ code --list-extensions chuckjonas.apex-pmd dbaeumer.vscode-eslint esbenp.prettier-vscode FinancialForce.lana redhat.vscode-xml salesforce.analyticsdx-vscode salesforce.analyticsdx-vscode-core
salesforce.analyticsdx-vscode-templates salesforce.salesforce-vscode-slds
salesforce.salesforcedx-vscode salesforce.salesforcedx-vscode-apex salesforce.salesforcedx-vscode-apex-debugger salesforce.salesforcedx-vscode-apex-replay-debugger salesforce.salesforcedx-vscode-core salesforce.salesforcedx-vscode-expanded salesforce.salesforcedx-vscode-lightning salesforce.salesforcedx-vscode-lwc salesforce.salesforcedx-vscode-soql salesforce.salesforcedx-vscode-visualforce vibd.sfdx-cli

gbockus-sf commented 2 years ago

@Sainath-Attuluri @ronika-das My apologies on it taking so long to get back to this issue. I've assigned it to myself so it doesn't slip off the radar again. Everything looks normal in the provided output. It seems that something if failing during initialization that is resulting in the extensions only being partially loaded. Can you try the following:

  1. Open VSCode
  2. Help > Toggle Developer Tools
  3. From the command pallet: Developer: Reload Window
  4. Look at the console in the developer tools for any errors (red text). If you right click in the console of the dev tool you can save it to file. Please upload that file here so we can dig into what is failing to load. Thanks!
gbockus-sf commented 1 year ago

@Sainath-Attuluri @ronika-das Just wanted to touch base and see if you were able to execute the above debug actions.

randi274 commented 1 year ago

Hi all - touching base to see if this is still an issue with the latest version of the extensions (v56.4.1)?

rdatta11 commented 1 year ago

@randi274 I'm still getting this issue with v56.3.1, additionally I'm unable to see other SFDX commands beyond SFDX Create Project, SFDX Create and Setup Project for ISV Debugging, and SFDX Create Project with Manifest. I'm on an Intel Mac (11.6.8) using VS Code v1.53.2.

The output of the above requests:

  1. ls ~/.vscode/extensions/ bradlc.vscode-tailwindcss-0.7.7/ salesforce.salesforcedx-vscode-apex-debugger-56.3.1/ dbaeumer.vscode-eslint-2.1.20/ salesforce.salesforcedx-vscode-apex-replay-debugger-56.3.1/ esbenp.prettier-vscode-7.1.1/ salesforce.salesforcedx-vscode-core-54.3.0/ms-python.python-2021.2.633441544/ salesforce.salesforcedx-vscode-core-56.3.1/ms-toolsai.jupyter-2021.2.603412351/ salesforce.salesforcedx-vscode-lightning-56.3.1/rlivings39.fzf-quick-open-0.4.7/ salesforce.salesforcedx-vscode-lwc-56.3.1/salesforce.salesforce-vscode-slds-1.4.8/ salesforce.salesforcedx-vscode-soql-56.3.1/salesforce.salesforcedx-vscode-54.3.0/ salesforce.salesforcedx-vscode-visualforce-56.3.1/salesforce.salesforcedx-vscode-56.3.1/ vscodevim.vim-1.21.5/salesforce.salesforcedx-vscode-apex-56.3.1/ zhuangtongfa.material-theme-3.9.15/

When I ran Create Project I got the following error messages in my VS Code Console. Screen Shot 2022-11-07 at 5 37 02 PM

Let me know if there's additional information I can give to help you debug.

github-actions[bot] commented 1 year ago

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

ronika-das commented 1 year ago

Hi all. apologies for late response Personally for me it is working. I uninstalled and installed everything back. It took me 2-3 tries

@gbockus-sf @randi274 Thank you for taking a look. I will perform the steps mentioned in case it happens again

gbockus-sf commented 1 year ago

@rdatta11 Thanks for the screenshot. The activating extension error is definitely the problem. In v56* of the extensions we made some major changes around how the extensions are bundled. In doing so we also updated some activation events to use a newer feature from the vscode API to read the current version of the extension. This is the source of the packageJSON error.

I was able to repo the problem by downloading v1.53.2 of VSCode. We initially missed bumping the configuration to tell the extension it needed the newer version of vscode, but caught it on the next release of the extensions (56.5.1). This is why the extension is greyed out in the extensions view for that version:

Screen Shot 2022-11-15 at 5 29 05 PM

So Options: work around

solution

Thanks for working with us to identify the issue.

rdatta11 commented 1 year ago

@gbockus-sf thank you for following up and the solution! It worked for me, albeit for some reason I wasn't able to get it to work on my existing code base, so I had to copy the files over to a new repository and was able to get it to work then.