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

Plugin not working properly on IntelliJ, but works on PyCharm #379

Open
GabrielDumbrava opened this issue Feb 13, 2023 · 9 comments
Open

Comments

@GabrielDumbrava
Copy link

It seems that the plugin is not working properly on IntelliJ, but works perfectly on PyCharm.

Here is a comparison of the two, with the IntelliJ on the left and pycharm on the right:

2023-02-13_11-44

If I remove the second object from the IntelliJ definition then the code is rendered properly:
2023-02-13_11-44_1

I'm using the same plugin version and the same configuration on the same Ubuntu 22.04 machine.
2023-02-13_11-46

@GabrielDumbrava
Copy link
Author

GabrielDumbrava commented Feb 15, 2023

If I change the path to the dot to /usr/bin/dot which is the place where the bash shell finds it then I get the same error, File does not exist. Upon further investigation I see that IntelliJ is using /bin/sh as shell whereas PyCharm uses /bin/bash. If I try to find /usr/bin/dot with sh the I get no file with that name.

On bash it's a link to /usr/bin/dot -> ../sbin/libgvc6-config-update*, so this might be a difference between the two apps.

@ConorGarry
Copy link

I'm having a very similar issue with Android Studio.

Seems to work fine if I have a single class in a diagram:
Screenshot 2023-02-21 at 14 56 18

But if I add a second class it breaks with the same error:

Screenshot 2023-02-21 at 14 56 12

  • I have the correct graphwiz location set in PlantUML settings: /opt/homebrew/bin/dot.
    Screenshot 2023-02-21 at 15 01 37

  • I also tried setting the global variable GRAPHVIZ_DOT in my bash_profile as a last resort.

From the logs:

2023-02-21 13:30:49,134 [4857496]   INFO - STDERR - java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
2023-02-21 13:30:49,134 [4857496]   INFO - STDERR - 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
2023-02-21 13:30:49,134 [4857496]   INFO - STDERR - 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
2023-02-21 13:30:49,134 [4857496]   INFO - STDERR - 	at java.base/java.lang.Runtime.exec(Runtime.java:594)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:163)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:123)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:79)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - Caused by: java.io.IOException: error=2, No such file or directory
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	... 5 more
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - java.io.IOException: Cannot run program "/opt/local/bin/dot": error=2, No such file or directory
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.Runtime.exec(Runtime.java:594)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.startThreads(ProcessRunner.java:163)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at net.sourceforge.plantuml.cucadiagram.dot.ProcessRunner$MainThread.runJob(ProcessRunner.java:123)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at net.sourceforge.plantuml.api.TimeoutExecutor$MyThread.run(TimeoutExecutor.java:79)
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - Caused by: java.io.IOException: error=2, No such file or directory
2023-02-21 13:30:49,135 [4857497]   INFO - STDERR - 	at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
2023-02-21 13:30:49,136 [4857498]   INFO - STDERR - 	at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
2023-02-21 13:30:49,136 [4857498]   INFO - STDERR - 	at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
2023-02-21 13:30:49,136 [4857498]   INFO - STDERR - 	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
2023-02-21 13:30:49,136 [4857498]   INFO - STDERR - 	... 5 more

Android Studio Flamingo | 2022.2.1 Beta 2
Build #AI-222.4459.24.2221.9526055, built on January 25, 2023
Runtime version: 17.0.5+7-b469.71 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

@krasa
Copy link
Collaborator

krasa commented Feb 21, 2023

Isn't there some permission problem?
Does it work directly from the IDE's terminal? https://plantuml.com/command-line

@krasa
Copy link
Collaborator

krasa commented Feb 27, 2023

A single class in a diagram works because it does not use Graphviz.

What does this show?

@startuml
testdot
@enduml

@REBOOTERS
Copy link

A single class in a diagram works because it does not use Graphviz.

What does this show?

@startuml
testdot
@enduml
image

@REBOOTERS
Copy link

activity-diagram is ok, object-diagram don't work

@krasa
Copy link
Collaborator

krasa commented Aug 15, 2023

@REBOOTERS That did not work, because of a configured skin. Try this:

image

@krasa
Copy link
Collaborator

krasa commented Aug 28, 2023

Is it still broken?
It should be fixed with 1.2023.8
But if the configured path (in the plugin settings dialog) did not work before, then I doubt that it will help.

plantuml/plantuml#469

@GabrielDumbrava
Copy link
Author

I did take a second look and I have a few more details. First the PyCharm (left) and IntelliJ (right) configurations are the same:

2023-09-06_20-44

One difference between them is that IntelliJ is using sh as shell and the file owners seem to be completely different than the ones on the system, and as seen by PyCharm.

IntelliJ can't find /usr/bin/dot and the file owner is nfsnobody.nfsnobody as you can see bellow:

2023-09-06_20-37

PyCharm correctly, and using bash, can access the file:

2023-09-06_20-49

Also the locale is different on IntelliJ than with PyCharm, even if I did a complete reset of IntelliJ settings.

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

No branches or pull requests

4 participants