Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

SVT: Error running command ext.cw.removeProject: command ext.cw.removeProject not found #3083

Open
sujeilyfonseca opened this issue Jun 1, 2020 · 3 comments
Labels
area/vscode-ide Issue associated with the Codewind VS Code/Theia extension kind/bug

Comments

@sujeilyfonseca
Copy link

Codewind version: 0.13.0
OS: VM with Windows 10

IDE extension version: 0.13.0
IDE version: Code 1.45.1

Description: Error running command ext.cw.removeProject: command ext.cw.removeProject not found. This is likely caused by the extension that contributes ext.cw.removeProject.

Screen Shot 2020-05-31 at 9 19 05 PM

Screen Shot 2020-05-31 at 9 22 56 PM

Screen Shot 2020-05-31 at 9 34 12 PM

Steps to reproduce:

  1. Install and start Codewind 0.13.0
  2. Create some projects
  3. Delete them
  4. The error will appear intermittently

Logs:
codewind.log
codewind-pfe.txt

@jagraj

@stalleyj stalleyj added the area/vscode-ide Issue associated with the Codewind VS Code/Theia extension label Jun 1, 2020
@tetchel
Copy link

tetchel commented Jun 1, 2020

The only reason this error would be shown is if the extension is deactivated briefly.

It's possible this is happening because your workspace folders are modified when you delete a project. If the workspace folder (project) deleted is the last one in your workspace, the extension deactivates:

If the first workspace folder is added, removed or changed, the currently executing extensions (including the one that called this method) will be terminated and restarted

I tried to show a message (seen in the second screenshot) when that was going to happen, but not enough info was available to always detect that case. I see from your multiple Codewind Home tabs that the extension has reloaded a number of times.

Does the the problem seem to only happen when deleting the last project? Otherwise, do you have any idea what the error conditions may be?

It looks like you're on Windows, so is it a VM / slow machine? If the machine is slow it will take some time to reload extensions.

@sujeilyfonseca
Copy link
Author

The problem seemed to occur in the last project deletion. I created three MicroProfile projects twice and got the error on the third deletion. Then, I created additional types of projects, and the error seemed to occur with the last one as well.

Furthermore, I believe Codewind is being refreshing or disconnecting itself.

In my Windows VM, there were multiples Codewind Home pages, as you noticed, due to Codewind disconnecting/reloading itself, and now the connection is lost after several hours. My Windows VM is from vLaunch. It tends to work fine, as I was not having issues with other Codewind releases. I'll continue debugging to see if I can gather more information.

I had also seen a similar error on the project creation when Codewind refreshed itself on Windows and Mac OS. Codewind refreshed after the first project creation:

Screen Shot 2020-06-01 at 2 15 55 PM

Screen Shot 2020-06-01 at 4 14 33 PM

@tetchel
Copy link

tetchel commented Jun 1, 2020

To be clear, Codewind is not refreshing or reloading itself, it is rather VS Code forcing all extensions to reload when the first (topmost) workspace folder is modified.

See:
https://github.com/eclipse/codewind-vscode/blob/master/dev/src/MCUtil.ts#L386
https://code.visualstudio.com/api/references/vscode-api ->
image

So the extension being refreshed is not a bug, but rather a quirk of the VS Code workspace folder behaviour, which I can't seem to work around. The only way around this would be to remove the extension's automatic adding and removing of workspace folders.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/vscode-ide Issue associated with the Codewind VS Code/Theia extension kind/bug
Projects
None yet
Development

No branches or pull requests

3 participants