drawio-desktop
drawio-desktop copied to clipboard
Plugins work only once after reload
Preflight Checklist
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Plugin doesn't work after 2 reloads. When you add plugin (Extras - Plugins - Add) it has path like plugins/trees/trees.js
, but it doesnt work until reload. After reloading it works, but it has path ./plugins/trees/trees.js
. After next reload you have path ./plugins/trees/trees.js
and not working plugin.
To Reproduce Steps to reproduce the behavior:
- Go to 'Extras - Plugins'
- Add some plugin, check the path. It should be like 'plugins/...'
- Close application
- Open some already existed .drawio file from file explorer
It doesn't reproduce, if you open file from
File - open
orFile - Open recent
- Check that plugin is working and it path has changed './plugins/...'
- Reload application
- Check that plugin doesn't work and it path has changed path './plugins/...'
Expected behavior After opening files from anywhere you have working plugins
Screenshots
step 2
step 3
step 4
- draw.io version 23.0.2
Desktop (please complete the following information):
- OS: windows 11 (23H2 + russian OS language)
- Desktop application
Additional context I had almost the same issue several month ago and it was fixed but it appears one more time... https://github.com/jgraph/drawio/issues/3395
Hi, I can add some info on the cause:
- after installing a plugin, it is saved with full-path
file://<full-path-to-js-file>
- In App.main, here the loading code assumes that it is a path starting with plugins or else it calls getPluginFile:
let pluginFile = await requestSync({
action: 'getPluginFile',
plugin: plugins[I]
});
which in turn assumes it is a file-name only see here
so the issue is either when storing the plugin file in the settings as full-path or at processing it no considering that it is a full-path
Please try the new release 12.4.0