drawio-desktop: Unable to load plugin if opening a new project

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug A clear and concise description of what the bug is.

Plugins work fine after the first time restarting to take effect. But if opening another project or reopening the current project, plugins don’t work. The board of plugins shows all is loaded, but the developer’s tool doesn’t list the folder plugins.

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘Extras’
  2. Click on ‘plugin’ and add any plugins (like text.js)
  3. Restart to take effect -> board list text.js | Adds Extras > Extract Text | develop tools list all plugins loaded (plugins/text.js)
  4. Close the project and open another project
  5. Click Extras > Plugin -> list text.js
  6. Click Extras -> Extract Text Not found
  7. Open develop tools -> plugins/text.js not loaded

Expected behavior A clear and concise description of what you expected to happen.

The plugin should work for all the projects after it’s loaded. It’s contradictory that the board shows the plugin loaded but it doesn’t work. And it saves much time if it takes effect for all instead of just the current project.

Screenshots If applicable, add screenshots to help explain your problem.

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 22.0.2

Desktop (please complete the following information):

  • OS: Windows

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: open
  • Created 8 months ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

I think plugin path may be not right. when you first added the plugin ,path is ‘plugin/sql.js’; but when you restart app the plugin path is ‘./plugin/sql.js’. now plugin cannot work, dev tool can not find plugin sql.js. draw io_UW9xNO7K7W

Did you run the app with --enable-plugins parameter?

yes, I start app with command line with --enable-plugins parameter , but plugins can not work. The plugins only work in your first time, when you create new file plugin can not work.

This is the problem I’m encountering. So I have to uninstall the plugin, then reload it and restart the software each time.