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

Confusing error message "no @startuml found" #265

Closed
DanielSundberg opened this issue Oct 10, 2019 · 7 comments
Closed

Confusing error message "no @startuml found" #265

DanielSundberg opened this issue Oct 10, 2019 · 7 comments

Comments

@DanielSundberg
Copy link

Copied a uml document from Jira, it lacks the @enduml tag and I get the confusing error message "no @startuml found".

To reproduce, create a file with the following uml:

@startuml
:Hello world;
:This is defined on
several **lines**;

Then press Alt+D:

2019-10-10 12_50_52-New Issue · qjebbs_vscode-plantuml

Adding the @enduml tag fixed the problem. However, for a newbie pasting some random puml this was a bit confusing.

@qjebbs
Copy link
Owner

qjebbs commented Nov 11, 2019

Server behaves different with Local, within this topic.

  • Same content as you provided, Local renders failed, while server renders OK.
  • Remove the first line @startuml, Local renders OK, while server returns 500 error

Anyway, this message is given by plantuml.jar or plantuml server, not the extension, it's better to improve in plantuml project's side.

@qjebbs qjebbs closed this as completed Nov 11, 2019
@DanielSundberg
Copy link
Author

DanielSundberg commented Nov 11, 2019

If I try to reproduce this using the jar-file I get when I download plantuml.jar I get another error message:

>java -jar plantuml.jar -verbose test.puml
(0.000 - 15 Mo) 12 Mo - PlantUML Version 1.2019.12
(0.007 - 15 Mo) 12 Mo - GraphicsEnvironment.isHeadless() false
(0.012 - 15 Mo) 12 Mo - Found 1 files
(0.012 - 15 Mo) 12 Mo - Working on C:\code\plantuml\test.puml
(0.019 - 15 Mo) 11 Mo - Setting current dir: .
(0.020 - 15 Mo) 11 Mo - Setting current dir: C:\code\plantuml
(0.020 - 15 Mo) 11 Mo - Using default charset
(0.027 - 15 Mo) 11 Mo - Reading from test.puml
(0.039 - 15 Mo) 13 Mo - Reading file: test.puml
(0.039 - 15 Mo) 13 Mo - Number of image(s): 0
Warning: no image in C:\code\plantuml\test.puml
No diagram found

I still don't like the error message but at least it's a bit more generic.

Just trying to report on my initial experience with the extension. A new user that downloaded this extension 2 minutes ago has no idea about and doesn't care about server or local rendering.

@qjebbs
Copy link
Owner

qjebbs commented Nov 12, 2019

Of course they don't. When I talk about renders, I'm talking about different messages the plantuml project (not the extension) gives.

Please report to them. This extension just do its part of job, not to bypass, cover or change upstream project's behavior.

@fuhrmanator
Copy link
Contributor

I found this issue for the same reason as @DanielSundberg (I'm trying to use it in courses with newbie students).

I would like to report it upstream (PlantUML devs on github fix bugs very quickly). But I can't get an image with no @startuml found to appear when rendering locally. It's hard for me to reproduce this outside of the extension to make an issue on their github.

Can you explain how the extension shows the image with that error? Is it in a temp file on disk?

@qjebbs
Copy link
Owner

qjebbs commented Dec 4, 2019

The extension sends what you're typing as is, to plantuml.jar, and shows what it gives back. Unless it's an error happens in this procedure, nothing I can do from the extension's end.

Since I'm not the author of plantuml.jar, I cannot tell most details of it, all I know was posted above.

@DanielSundberg
Copy link
Author

DanielSundberg commented Dec 4, 2019

I also wanted to report this upstream but gave up since I could not get plantuml.jar to report the same error.

If we reported this as is I'm pretty sure PlantUml would say it's a problem in this vscode-plantuml (since we get different behavior using plantuml command line).

@fuhrmanator
Copy link
Contributor

Took me some time, but I think it's here:

render(diagram: Diagram, format: string, savePath: string): RenderTask {

Here's how to reproduce it:

$ java -jar plantuml.jar -verbose -pipe < test.puml > out.png

Then view the out.png:

image

I tagged the PlantUML developer so he hopefully will see it here.

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

3 participants