docToolchain / diagrams.net-intellij-plugin

An IntelliJ plugin which allows you to edit diagrams.net (formerly known as draw.io) diagrams directly in IntelliJ!
https://plugins.jetbrains.com/plugin/15635-diagrams-net-integration
Apache License 2.0
128 stars 16 forks source link

Javascript alert Error: Uncaught Class OrgChart.Annotations.CanBeNullAttribute is already defined #301

Closed kjeldahl closed 1 month ago

kjeldahl commented 3 months ago

I keep getting this notification whenever I open a diagram in Rubymine. Plugin version: 0.2.5 RubyMine 2024.1.1 Build #RM-241.15989.113, built on April 24, 2024 Runtime version: 17.0.10+1-b1207.14 aarch64

image

It does not seem to impact any functionality though.

ahus1 commented 3 months ago

Can you please provide an example diagram where this happens?

kjeldahl commented 3 months ago

Sure, here is an empty one I just created as an "Editable svg file"

Test

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1px" height="1px"
     viewBox="-0.5 -0.5 1 1"
     content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2021-04-15T16:58:14.004Z&quot; agent=&quot;5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36&quot; etag=&quot;9hHl-fft3fX4wfAVMn7f&quot; version=&quot;14.6.0&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;23iRSUPoRavnBvh4doch&quot; name=&quot;Page-1&quot;&gt;dZHBEoIgEIafhjtCZZ3N6tLJQ2dGNmEGXQdptJ4+HTBjrJk97H77Lz8shGf1cLaiVVeUYAijciD8SBhLNoyRKah8epLSrQeV1TKIFlDoFwRIA31oCV0kdIjG6TaGJTYNlC5iwlrsY9kdTezaigpWoCiFWdOblk55umfpwi+gKzU7J7uD79RiFoeXdEpI7L8QzwnPLKLzWT1kYKblzXvxc6c/3c/FLDTux8CYLGePRfRDPH8D&lt;/diagram&gt;&lt;/mxfile&gt;">
  <defs/>
  <g/>
</svg>
Glydric commented 2 months ago

Same here for RustRover, but also lags a lot and is unusable

michaelbeauchemin commented 2 months ago

Seeing the same behavior (JavaScript Alert popup, odd coloring) within Intellij IDEA Ultimate EAP Build #IU-242.14146.16, built on June 1, 2024.

ahus1 commented 1 month ago

I was able to find those error messages in the JCEF developer tools, although they never appeared in any part of the IDE or as a pop-up.

Note to my future self: I found that since the diagrams.net upgrade to 20.8.16 I don't need to load the minified other parts of the application, as they will initialize themselves.

https://github.com/jgraph/drawio/blob/6bea84f05906233f552e20bc63e078763740a442/src/main/webapp/js/diagramly/App.js#L1084-L1091

This will be part of the next release of the pluign.

ahus1 commented 1 month ago

There is now pre-release 0.2.6 available which includes a fix for this issue. Please give it a try and let me know if it works in your setups as expected.

The pre-release of the plugin is available from GitHub releases.

To try out a pre-release:

  1. Download the new release file diagrams.net-intellij-plugin-xx.xx.xx.zip from the Assets section of the release.
  2. Go to menu File | Settings... | Plugins | Gear Icon (⛭).
  3. Choose Install plugin from disk....
  4. Choose the downloaded file in the file selection dialogue.
  5. Restart the IDE to activate the new plugin version.
kjeldahl commented 1 month ago

@ahus1 It is working. 👍 Thanks for looking into it. Will the pre-release plugin I installed be updated automatically when the new version is released or must I remove it manually?

ahus1 commented 1 month ago

Happy to hear it now works as expected.

Will the pre-release plugin I installed be updated automatically when the new version is released

Yes, the next version will be installed automatically. IntelliJ will check for a higher version number in the marketplace and will prompt you for an upgrade once that is available.

ahus1 commented 1 month ago

I'll publish the version 0.2.6 to the marketplace, and it will be available with in 1-2 business days once the new version has been approved be the JetBrains Marketplace team.