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

Unable to load plugin if opening a new project #1508

Closed
2 tasks done
dzylikecode opened this issue Oct 20, 2023 · 15 comments
Closed
2 tasks done

Unable to load plugin if opening a new project #1508

dzylikecode opened this issue Oct 20, 2023 · 15 comments
Labels
completed completed

Comments

@dzylikecode
Copy link

dzylikecode commented Oct 20, 2023

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.

@davidjgraph
Copy link
Contributor

And you've enabled plugins in the command parameters to run desktop?

@dzylikecode
Copy link
Author

dzylikecode commented Oct 21, 2023

yes, here was the command I used.

'C:\Program Files\draw.io\draw.io.exe' --enable-plugins "d:\FDU\FDU-Course\docs\HW\02\HW-02-04.drawio.svg"

@m-mohamedin
Copy link
Contributor

Unfortunately, we couldn't reproduce.
Is there any errors in the developer tools?

@maochunguang
Copy link

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

@m-mohamedin
Copy link
Contributor

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?

@maochunguang
Copy link

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.

@maochunguang
Copy link

I record a gif.
draw io_jmK5GK2HzZ

@dzylikecode
Copy link
Author

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.

@m-mohamedin
Copy link
Contributor

As a workaround, please try editing the shortcut and add --enable-plugins to the Target
Screenshot 2023-12-31 at 5 10 50 PM

@maochunguang
Copy link

As a workaround, please try editing the shortcut and add --enable-plugins to the Target Screenshot 2023-12-31 at 5 10 50 PM

It is the same things as before.

@m-mohamedin
Copy link
Contributor

As a workaround, please try editing the shortcut and add --enable-plugins to the Target Screenshot 2023-12-31 at 5 10 50 PM

It is the same things as before.

What's your version, I cannot reproduce?

@maochunguang
Copy link

I resolved this by delete appdata cache. I think drawio can not load plugin because of app cache in windows.

@davidjgraph
Copy link
Contributor

@dzylikecode as the OP, what is the status of your issue?

@dzylikecode
Copy link
Author

I have not resolved it yet, and I am still using the approach I mentioned earlier.

@filantus
Copy link

Same thing.

Draw.io: v24.2.5
OS: Win11

Steps to reproduce:

  1. Add any plugin (e.g. "anon", as it's easy to see difference. it's adds menu item to "Extras").
  2. Get warning that changes will be applied after restart.
  3. Close the app. !Important! Do not run Draw.io by shortcut on desktop or start menu! Instead of that open some .drawio file.
  4. Plugin is works. But not so long.
  5. Close the app. Open some .drawio file again.
  6. Plugin is not works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed completed
Projects
None yet
Development

No branches or pull requests

5 participants