vscode-plantuml icon indicating copy to clipboard operation
vscode-plantuml copied to clipboard

PlantUML server is mandatory

Open rspielmann opened this issue 5 years ago • 24 comments

It seems like since v 2.11.3 it is mandatory to configure a rendering server. I am unable to use the locally installed PlantUML, even though the render policy is set to "local".

rspielmann avatar Sep 03 '19 11:09 rspielmann

Related to this commit?

https://github.com/qjebbs/vscode-plantuml/commit/c37ac957d5bad5fcfbac6e880bee129339eac9a7

rspielmann avatar Sep 03 '19 11:09 rspielmann

Environment:

Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:17:25.463Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Linux x64 4.15.0-58-generic

rspielmann avatar Sep 03 '19 11:09 rspielmann

Cannot reproduce, if render set to Local, 'server' doesn't used at all, except markdown rendering, which is force to use Server render.

qjebbs avatar Sep 04 '19 00:09 qjebbs

I have the same issue with v2.11.3 and v2.12.0.

Environment:

Version: 1.37.1
Commit: f06011ac164ae4dc8e753a3fe7f9549844d15e35
Date: 2019-08-15T16:16:34.800Z
Electron: 4.2.7
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0

I am using default configuration for the plugin :

"plantuml.server": "",
"plantuml.render": "Local",

In the preview, I get the following message :

:danger:No PlantUML server, specify one with “plantuml.server”.

When I revert back to v2.11.2, it works again as before with the same configuration.

bed415 avatar Sep 04 '19 12:09 bed415

@bed415 Preview of what, markdown or diagram? It's expected you get this when preview markdown, follow the tip, specify your server.

See also: https://github.com/qjebbs/vscode-plantuml#notice

qjebbs avatar Sep 04 '19 12:09 qjebbs

image

qjebbs avatar Sep 04 '19 12:09 qjebbs

Same problem here.

@qjebbs For me it happens in Preview of markdown file with PlantUML diagram. Plantuml is not rendered but its source is shown with a warning at the top:

:danger:No PlantUML server, specify one with “plantuml.server”.

korthout avatar Sep 04 '19 15:09 korthout

@korthout Yes, it's expected, follow the tip, specify your server.

qjebbs avatar Sep 05 '19 01:09 qjebbs

To All: The server is mandatory for markdown rendering all the time, no matter the latest version or the past ones. The only difference is the removing of default value, for privacy reasons.

You can sill use the official server if you don't have your own:

{ 
   "plantuml.server": "https://www.plantuml.com/plantuml"
}

But you're asked to do the configuration Explicitly, which means you know what is going on.

See also: https://github.com/qjebbs/vscode-plantuml#notice

qjebbs avatar Sep 05 '19 08:09 qjebbs

I understand that a default value for the server no longer exists. But I did expect that during markdown preview, when rendering is set to "Local", it would still use the local plantuml installation. Because it doesn't do that (it apparently forces me to use a plantuml server for markdown preview), I opened this issue. So maybe I've misunderstood the "Render" option today. @qjebbs are you saying that plantuml rendering in markdown preview ALWAYS uses a server for rendering and that is has always been like that in the past?

rspielmann avatar Sep 05 '19 08:09 rspielmann

@rspielmann To your last concern, see https://github.com/qjebbs/vscode-plantuml/issues/247. And yes, the markdown integration is always relies on server.

qjebbs avatar Sep 05 '19 08:09 qjebbs

@qjebbs thanks for your explanations. What I thought was a regression is actually a nice bug fix improving security and privacy. Before that, my data was sent to the default server without me knowing. I don't fully understand the constraints you explained in #247, but anyway thank you for your nice work with this extension.

bed415 avatar Sep 06 '19 11:09 bed415

@bed415 You're welcome😀

qjebbs avatar Sep 06 '19 12:09 qjebbs

So sorry for digging this out again: Is it very difficult to rework this to have the Markdown integration in the same manner as for standalone files with local mode? Because sending our diagrams to an external party is indeed a privacy concern for us. In that sense I totally agree with @bed415. I will check out running a server locally but I'm also of the opinion that this creates a bigger barrier to entry for checking out this otherwise awesome tool and extension.

musiKk avatar Dec 20 '19 10:12 musiKk

@musiKk Setup your own server if you have privacy concerns

qjebbs avatar Dec 23 '19 02:12 qjebbs

I ran into this issue and ran a local server using Docker

aniongithub avatar Jan 30 '20 22:01 aniongithub

To All: The server is mandatory for markdown rendering all the time, no matter the latest version or the past ones. The only difference is the removing of default value, for privacy reasons.

This isn't mentioned anywhere in the readme (which is perhaps a better place than in an issue)...

uuf6429 avatar Oct 04 '20 21:10 uuf6429

In addition to the abovementioned issues, requiring the use of a PlantUML server for rendering a Markdown preview means that PlantUML diagrams cannot use the !include feature. The only workaround that I can see would be to run a local PlantUML server with a volume mount for sharing the included files.

sbalousek avatar Mar 19 '21 22:03 sbalousek

"The server is mandatory for markdown rendering all the time...". Run a local server? Uninstalled...

moincreemers avatar Jul 23 '22 20:07 moincreemers

"The server is mandatory for markdown rendering all the time...". Run a local server? Uninstalled...

It actually is not that bad - if we accept that the target audience for this extension are developers that run vs code, running a local server for this is certainly not a stretch.

Especially considering how easy it is to do so ( TLDR: (1) Pre-req: You have plantuml (and graphviz) installed on your machine. (2) Start local server by running plantuml.jar -picoweb -v. That is it. )

See https://github.com/qjebbs/vscode-plantuml#use-plantuml-server-as-render

That said, yes, the readme needs to be updated.

mawid6 avatar Oct 07 '22 11:10 mawid6

Go to File -> Preferences -> Settings in Search Settings, search for PlantUML Scroll down the searches until you get Plantuml: Render. Under that change from Local to PlantUMLServer. Under setting Plantuml: Server, type https://www.plantuml.com/plantuml Close and opent he file and preview to get the diagram.

Hope this works for you!

chandu140390 avatar Oct 18 '22 07:10 chandu140390

While running plantUML on a local machine as a server is a workaround (note: It's not a good one, because then VS Code asks you to allow "insecure local content"), the extensions vscode-markdown-preview-enhanced is capable of running an internal plantUML for markdown preview. Apparently they solved the technical problem you describe, @qjebbs ... would it be possible to apply their solution? I would much prefer if the option to render "local" or "server" would apply to everything including the Markdown inline preview.

arwedus avatar Feb 03 '23 15:02 arwedus

I also just found out that starting up a local plantUML picoweb or docker instance on my remote workstation doesn't even help because of bug #513 .

However, I am pleased to learn that well-ar has found a solution that works locally and in a remote SSH VS Code session: https://github.com/well-ar/vscode-plantuml This fork adds an option "LocalServer" and starts plantUML as a local webserver transparently in the background. That fork solved the problem for me now, but may be worth considering to pull, @qjebbs ?

arwedus avatar Feb 03 '23 19:02 arwedus