replugged-org / replugged

A lightweight Discord client mod focused on simplicity and performance.
https://replugged.dev/
MIT License
638 stars 65 forks source link

Uninstalling plugins doesn't work (Windows) #373

Open 12944qwerty opened 1 year ago

12944qwerty commented 1 year ago

Describe the bug

On Windows (only I believe), you can't uninstall plugins because of this error: Error: Error invoking remote method "REPLUGGED_UNINSTALL_PLUGIN": Error: EBUSY: resource busy or locked, unlink %AppData%\replugged\plugins\MyPlugin.asar

This only happens on asar plugins. I believe this is due to how electron uses asar files which blocks them from being edited (or deleted). We need a way to stop blocking asars when they're disabled while discord is still running.

Reproduction steps

  1. Install and enable plugin asar only
  2. Try uninstalling and check console

Expected behavior

To delete the plugin from the plugins directory completely.

Actual behavior

Plugin gets disabled but doesn't uninstall from directory. It is also removed from the plugin's list until you re-request for that list.

Additional information

No response

Please confirm the following

authorless commented 1 year ago

Relevant so far. You have to remove plugins manually by turning off Discord.

yofukashino commented 1 year ago

really should be fixed if they want more people to use it. because this is kinda a turnoff for many

bop34 commented 1 year ago

I can do the fix that someone suggested where there’s a list of plugins marked as to delete and it’s deleted on next load. It’s not a great permanent fix imo, but it should fix it for now.

asportnoy commented 1 year ago

Do you want to take this then?

12944qwerty commented 1 year ago

I asked on stackoverflow but got no responses there... try your luck