esteinberg / plantuml4idea

Intellij IDEA plugin for PlantUML
Apache License 2.0
633 stars 113 forks source link

EmptySvgException when write docs over two lines #319

Closed mactkg closed 3 years ago

mactkg commented 3 years ago

I encountered a strange issue. I tried to find a workaround, but I give up... Please help!

Environment

I'm using this plugin on WebStorm 2021.2/MacBook Air(M1, 2020). Graphviz is installed using homebrew.

The error

I wrote a small test doc but I got an error like this.

@startuml
interface List
interface Collection
@enduml

error

Fixed case

The error is fixed when commenting out a line.

@startuml
interface List
- interface Collection
@enduml

ok

Try custom PlantUML jar but failed

I installed PlantUML via homebrew, and I changed the plugin configuration to use a custom jar but got the same result.

image

Try using the custom jar from CLI, it works

However, I use the same jar from CLI, it works...

java -jar /opt/homebrew/Cellar/plantuml/1.2021.9/libexec/plantuml.jar -Djava.awt.headless=true FILENAME

data

Is there any other way to fix it?

krasa commented 3 years ago

Strange, it works fine for me on Win10.

Disable this image

mactkg commented 3 years ago

@krasa Thanks for the reply! I disabled it but got the same error.

image

I try Remote Rendering, it works.

krasa commented 3 years ago

It seems that your graphviz does not work correctly, perhaps try a different version

mactkg commented 3 years ago

OK, I try graphviz 2.44 as mentioned https://plantuml.com/ja/graphviz-dot

mactkg commented 3 years ago

I notice that installing graphviz / plantuml was failed somehow. The plugin works correctly after reinstalling xcode command line tools by sudo rm -rf /Library/Developer/CommandLineTools && xcode-install --install and graphviz and plantuml by brew reinstall plantuml, graphviz.

The issue is fixed. Thanks.