-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Plugins modules are not correctly unloaded on uninstall (or updates) #3940
Comments
I can confirm that this workaround is working with my plugin: Without it, changes in my settings names are not visible unless I restart the server. With the call to decache, everything works fine. |
@Chocobozzz , tell me if you want me to make a PR with a fix. |
Yes please 👍 |
For the record, I found a similar potential bug in server/initializers, function reloadConfig. |
No we haven't, but it safer to use decache here too |
Ok, i'll do the PR. |
Describe the current behavior
While working on new plugins, I have sometimes weird behaviors that requires a peertube restart.
I thinks that it is because of these lines:
PeerTube/server/lib/plugins/plugin-manager.ts
Lines 413 to 415 in 0564fc0
Plugins are unloaded using:
But if they are requires in the module main file, it will not be unloaded.
So, when you update your module code, it will mix old and new modules.
Describe the expected behavior
Plugin imported files should be unloaded too.
I think this module can help: https://www.npmjs.com/package/decache
Additional information
The text was updated successfully, but these errors were encountered: