Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall an extension does not deleted the extension from the ".theia/deployedPlugins" folder #13379

Closed
safisa opened this issue Feb 12, 2024 · 4 comments · Fixed by #13427
Closed
Labels
bug bugs found in the application plug-in system issues related to the plug-in system
Milestone

Comments

@safisa
Copy link
Contributor

safisa commented Feb 12, 2024

Bug Description:

Hi,

When installing an extension from the OpenVSX store, the extension is installed and extracted into the user .theia/deployedPlugins folder, but when doing uninstall, the extension folder is not deleted from that folder.
Now once restarting Theia, it will re-install all the plugins under that folder, the same plugins that the user has uninstalled before !!!

I checked the Theia source code, and I think the issue is in the setSourceLocationsForPlugin method in the HostedPluginDeployerHandler class. I have created a new CustomHostedPluginDeployerHandler class rebind it instead of the original one and changed the following in that method which fixes the issue: entry.originalPath() --> entry.rootPath

Not sure if this is the correct fix, I opened this ticket is order to have the correct fix in the next Theia versions.

Steps to Reproduce:

  1. install any extension from open vsx store
  2. uninstall this extension
  3. validate that the extension folder still exists under the user .theia/deployedPlugins folder
  4. restart Theia
  5. you will see that the extension is installed again

Additional Information

  • Operating System: Mac
  • Theia Version: Theia 1.45.1
@msujew
Copy link
Member

msujew commented Feb 12, 2024

cc @xai possible regression from #13178?

@msujew msujew added bug bugs found in the application plug-in system issues related to the plug-in system labels Feb 12, 2024
@xai
Copy link
Contributor

xai commented Feb 12, 2024

Possible! Thanks for pinging, I'll check!

@xai
Copy link
Contributor

xai commented Feb 27, 2024

Hello @safisa,

Thank you for identifying this issue. I was able to reproduce the problem using both extensions from the registry and local .vsix files. Your suggested fix works and seems logical to me, so I have opened a draft PR (#13427) and included a Co-authored-by line in my commit to acknowledge your contribution. Is that ok for you?

@safisa
Copy link
Contributor Author

safisa commented Feb 27, 2024

Hi @xai,
Sure, this is OK, and thank you very much.

@jfaltermeier jfaltermeier added this to the 1.47.0 milestone Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants