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

Preview not updating

Open tpotter7 opened this issue 5 years ago • 21 comments

I'm running on Windows 10 Pro. I'm using VSCode 1.42.1. I'm using the PlantUML 2.13.6 extension. When I initially select Preview for my puml file, it shows the diagram just fine. Then, when I make updates the diagram does not update. If I re-select preview, the diagram does not update. If I close the diagram window and select preview, the preview will not open. Alt-D provides the same results as if I select "PlantUML:Preview Current Diagram" from the Command Pallet. The only way I can get the diagram to update is to re-start VSCode, load the puml file, and select to preview the diagram again.

tpotter7 avatar Feb 19 '20 19:02 tpotter7

I just remembered that a very small percent of the time, the diagram will update once or twice as I'm editing the puml file, then it stops updating and the above described symptoms occur. The much more likely scenario is that it never updates after being initially drawn. It is like it gets stuck and then just never responds to change/update requests after that.

tpotter7 avatar Feb 19 '20 19:02 tpotter7

What can you see in Help - Show Developper Tool or somthing like that?

qjebbs avatar Feb 20 '20 04:02 qjebbs

Not sure I understand your question. Are you looking for VSCode console log output? If no, please let me know what you are looking for. VSCode does not have the menu you mention below. If yes, I see the following errors showing up in the log after the diagram freezes and stops updating:

[Extension Host] rejected promise not handled within 1 second: SyntaxError: "c:/Users/tpotter8/Documents/DOJ/UML/4-Eligibility%20Check.puml" is not a valid JSON Schema. [Extension Host] stack trace: SyntaxError: "c:/Users/tpotter8/Documents/DOJ/UML/4-Eligibility%20Check.puml" is not a valid JSON Schema at c:\Users\tpotter8.vscode\extensions\arjun.swagger-viewe-2.2.2\node_modules\json-schema-ref-parser\lib\index.js:114:19 [[object Object]]"c:/Users/tpotter8/Documents/Projects/DOJ/UML/4-Eligibility%20Check.puml" is not a valid JSON Schema SyuntaxError: "c:/Users/

This same set of console log messages repeats as I edit my puml file but the diagram does not update with the edits. If I close VSCode and re-open it, the diagram repaints and it has all my updates with no errors. It will then update as I edit for a random amount of time (maybe 1-10 updates) and then it freezes again.

So, I uninstalled the swagger viewer and tested again. Now it still does not update the diagram as I make changes but will if I restart VSCode. In the console, there are no error messages anymore. Everything else works. I can export and do other things. It is just that the diagram does not update and is frozen. Even if I close the preview window and select preview diagram again from the command pallet, it does not show the diagram (until I close and reopen VSCode).

On Feb 19, 2020, at 8:09 PM, Jebbs [email protected] wrote:

What can you see in Help - Show Developper Tool or somthing like that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qjebbs/vscode-plantuml/issues/290?email_source=notifications&email_token=ALCFZLHZ3AGXH3FB25PNFE3RDX7AFA5CNFSM4KX7XY7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMKVB4Q#issuecomment-588599538, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCFZLELNKT72UVAG3JVJ6DRDX7AFANCNFSM4KX7XY7A.

tpotter7 avatar Feb 25 '20 23:02 tpotter7

Same problem on Fedora 31. No error log found in the developer console.

aploskov avatar Apr 02 '20 06:04 aploskov

Hello, Same issue than tpotter7 and same behaviour on all tries But since VSCode 1.44.1 when I re-select preview (or Alt+D) it generates a new preview in the preview window (it's better than nothing)

gdbapi avatar Apr 15 '20 15:04 gdbapi

I finally solve this problem, now ext is working fine!

  1. uninstall plantuml in vscode
  2. clean files rm -rf ~/.vscode/extensions/jebbs.plantuml-2.13.12
  3. reinstall pluanuml ext in vscode

coderbean avatar Jun 15 '20 02:06 coderbean

Thanks for the update. Unfortunately, that did not work for me:-(

On Jun 14, 2020, at 7:58 PM, JacobChang [email protected] wrote:

I finally solve this problem, now ext is working fine!

uninstall plantuml in vscode clean files rm -rf ~/.vscode/extensions/jebbs.plantuml-2.13.12 reinstall pluanuml ext in vscode — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/qjebbs/vscode-plantuml/issues/290#issuecomment-643875910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCFZLDYO4JVX5GAT5DZ6FLRWWE4JANCNFSM4KX7XY7A.

tpotter7 avatar Jun 15 '20 17:06 tpotter7

I'm running on Windows 10 Pro. I'm using VSCode 1.42.1. I'm using the PlantUML 2.13.6 extension. When I initially select Preview for my puml file, it shows the diagram just fine. Then, when I make updates the diagram does not update. If I re-select preview, the diagram does not update. If I close the diagram window and select preview, the preview will not open. Alt-D provides the same results as if I select "PlantUML:Preview Current Diagram" from the Command Pallet. The only way I can get the diagram to update is to re-start VSCode, load the puml file, and select to preview the diagram again.

I am experiencing exactly the same issue: VSCode: 1.27.1 PlantUML extension: 2.13.12

tim-jones-001 avatar Jul 15 '20 16:07 tim-jones-001

I'm having similar issue - even with ServerSide rendering, this didn't help.

I can only copy paste the uml code to the localhost:8080/ then I can see the preview there

ele0nard avatar Nov 02 '20 12:11 ele0nard

Experiencing the same with

  • VSCode: Version: 1.51.1
  • PlantUML extension 2.13.16

It does not work also with external server rendering

ntmggr avatar Nov 22 '20 21:11 ntmggr

Still cannot reproduce here.

Can you guys try disable all other extensions except plantuml? I've ever encounter a extension conflict case.

The last tip, if any of you are capable to coding, you can clone and debug right in your environment, it's so much better than we guess where the problem is.

qjebbs avatar Nov 24 '20 07:11 qjebbs

I'm experiencing the same issue. All other extensions are disabled. Behaviour is the same if using local or server renderer

First time after opening VSCode preview works. The after some time (e.g. after some error is shown or after few updates) preview does not update. If preview window is closed then i can not reopen preview. After VSCode restart is works the same way. Closing/openin file does not solve the issue.

Export of diagram works in all cases.

  • running on windows 10
  • VSCode version 1.53.2
  • PlantUML extension 2.14.3

Matjaz-B avatar Feb 22 '21 11:02 Matjaz-B

Hi @Matjaz-B - I managed to get around this issue by running a Docker container running as a server (instruction here:https://github.com/plantuml/plantuml-server). Once it's up and running, you'll need to set this up on VSCode telling it to use the IP and port of that container.

I never had same issue since

ele0nard avatar Feb 22 '21 11:02 ele0nard

Hi @ele0nard, I was testing with public server and behaviour was the same. With local server issue should be gone?

Matjaz-B avatar Feb 22 '21 11:02 Matjaz-B

I run it locally yes - i just ran this

docker run -d -p 8080:8080 plantuml/plantuml-server:jetty

ele0nard avatar Feb 22 '21 11:02 ele0nard

Same here. Have to close VS code and launch it anew. How can I enable logging so that I can troubleshoot what's going on?

sba923 avatar Jul 07 '21 06:07 sba923

I was able to get it working after downloading the latest Java SDK and GraphViz. I used the information found here: https://www.rushis.com/plantuml-with-vscode/

Version: 1.58.2 (user setup) Commit: c3f126316369cd610563c75b1b1725e0679adfb3 Date: 2021-07-14T22:10:15.214Z Electron: 12.0.13 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Windows_NT x64 10.0.19042

joelwitherspoon avatar Jul 22 '21 00:07 joelwitherspoon

I was able to get it working after downloading the latest Java SDK and GraphViz. I used the information found here: https://www.rushis.com/plantuml-with-vscode/

Version: 1.58.2 (user setup) Commit: c3f126316369cd610563c75b1b1725e0679adfb3 Date: 2021-07-14T22:10:15.214Z Electron: 12.0.13 Chrome: 89.0.4389.128 Node.js: 14.16.0 V8: 8.9.255.25-electron.0 OS: Windows_NT x64 10.0.19042

Didn't fix anything for me.... 😭

sba923 avatar Jul 22 '21 16:07 sba923

Same happened for me until I put back the directives @startuml and @enduml at the start and end of the code

nleroux-bunnings avatar Feb 10 '22 07:02 nleroux-bunnings

Recently I had the same issue, updating VS Code solved my issue

ghost avatar Nov 01 '22 08:11 ghost

I resolved the problem by installing JRE x64.

erosenov avatar Nov 10 '22 07:11 erosenov