question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failing to preview diagram (Alt + D) [VSCode 1.27.2]

See original GitHub issue

Hi,

Preview diagram is failing on VSCode 1.27.2, it reports me the following error: Unable to open ‘PlantUML Preview’: resource is not available.

I’ve been digging about this (originally I though this was some bad configuration), but then I stumbled upon this comment stating that vscode.previewHtml is deprecated. So, I decided to take a look on extensions’ source code and found this. I tried to debug this to confirm this is what’s really causing the issue, but I’m a complete JS noob and couldn’t get to debug anything 😄 (.NET is my world 😉 )

Can you please tell if this is really an issue?

Thanks for your attention! 🙂

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
heraclitusqcommented, Oct 6, 2018

Encountered the similar issue today (not sure if it’s the same cause). VSC version 1.27.2 on MacOS 10.13.6. PlantUML plugin version: 2.9.3 Java version: 1.8.0_181-b13

prompt: Unable to open 'PlantUML Preview': resource is not available.

The export function doesn’t work either. not sure if it is related. The output:

TypeError: Cannot read property 'uri' of undefined
	at Config.exportOutDir (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/config.js:66:72)
	at Object.calculateExportPath (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/tools.js:99:34)
	at promises.push.diagrams.reduce (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/exporter/exportDiagrams.js:79:36)
	at Array.reduce (<anonymous>)
	at doExportsLimited (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/exporter/exportDiagrams.js:72:32)
	at Object.exportDiagrams (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/exporter/exportDiagrams.js:19:16)
	at Object.<anonymous> (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/exporter/exportDocument.js:56:26)
	at Generator.next (<anonymous>)
	at fulfilled (/Users/heraclitusq/.vscode/extensions/jebbs.plantuml-2.9.3/out/src/plantuml/exporter/exportDocument.js:4:58)
	at <anonymous>

tried specifying java and plantuml.jar location, reinstall graphviz, doesn’t help.

The command java -jar plantuml.jar test.wsd in the terminal works. (with the latest version of plantuml.jar downloaded from plantuml.com)

Thanks.

0reactions
qjebbscommented, Oct 6, 2018

Sorry, it’s my bad again…

Read more comments on GitHub >

github_iconTop Results From Across the Web

November 2022 (version 1.74) - Visual Studio Code
Learn what is new in the Visual Studio Code November 2022 Release (1.74)
Read more >
July 2022 (version 1.70) - Visual Studio Code
Python Get started experience - Quickly install and configure Python within VS Code. Sticky scroll preview - New scrolling UI shows current source...
Read more >
Visual Studio Code Frequently Asked Questions
Visual Studio Code FAQ. Our docs contain a Common questions section as needed for specific topics. We've captured items here that don't fit...
Read more >
April 2022 (version 1.67) - Visual Studio Code
Learn what is new in the Visual Studio Code April 2022 Release (1.67)
Read more >
Visual Studio Code September 2022
Extensions view updates - Highlights extensions with updates or needing ... to design the merge editor as an alternative view of a file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found