peele / plantuml-preview

Atom package.
MIT License
23 stars 13 forks source link

Uncaught Error: ENOENT: no such file or directory, open 'C:\Users\ajoiner\AppData\Local\Temp\plan... #8

Closed tekkies closed 8 years ago

tekkies commented 8 years ago

[Enter steps to reproduce below:]

  1. Install plantuml-preview
  2. Open file components.plantuml in Atom
  3. Open the preview (Ctrl-Alt-P or via Menu)
  4. Restart Atom
  5. Open file components.plantuml in Atom
  6. Open the preview (Ctrl-Alt-P or via Menu)

Note: a components.svg file already exists in the same folder as components.plantuml.

Atom Version: 1.3.2 System: Microsoft Windows 8.1 Enterprise Thrown From: plantuml-preview package, v0.11.0

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open 'C:\Users\ajoiner\AppData\Local\Temp\plantuml-preview\components.svg'

At fs.js:549

Error: ENOENT: no such file or directory, open 'C:\Users\ajoiner\AppData\Local\Temp\plantuml-preview\components.svg'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:137:20)
    at Object.fs.readFileSync (fs.js:397:15)
    at Object.fs.readFileSync (ATOM_SHELL_ASAR.js:385:29)
    at file:///C:/Users/ajoiner/.atom/packages/plantuml-preview/lib/plantuml-preview-view.coffee:293:23
    at exit (file:///C:/Users/ajoiner/.atom/packages/plantuml-preview/lib/plantuml-preview-view.coffee:309:7)
    at triggerExitCallback (C:\Users\ajoiner\AppData\Local\atom\app-1.3.2\resources\app.asar\src\buffered-process.js:213:47)
    at C:\Users\ajoiner\AppData\Local\atom\app-1.3.2\resources\app.asar\src\buffered-process.js:227:18
    at Socket.<anonymous> (C:\Users\ajoiner\AppData\Local\atom\app-1.3.2\resources\app.asar\src\buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

  3x -4:56.1.0 plantuml-preview:toggle (atom-text-editor.editor.is-focused)
 45x -2:28.7.0 core:move-down (atom-text-editor.editor.is-focused)
     -2:12.1.0 core:close (atom-text-editor.editor.is-focused)
 16x -1:55.7.0 core:move-down (div.plantuml-preview.padded.pane-item)
  7x -1:53.3.0 core:move-up (div.plantuml-preview.padded.pane-item)
     -1:40.1.0 pane:reopen-closed-item (div.plantuml-preview.padded.pane-item)
     -1:33 plantuml-preview:toggle (atom-text-editor.editor.is-focused)
  2x -0:59.2.0 pane:reopen-closed-item (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -0:32.1.0 plantuml-preview:toggle (atom-text-editor.editor.is-focused)
     -0:09.0 pane:reopen-closed-item (ul.list-inline.tab-bar.inset-panel)
     -0:04.8.0 core:save (atom-text-editor.editor.is-focused)
     -0:02.7.0 plantuml-preview:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {}
}

Installed Packages

# User
asciidoc-preview, v0.6.0
language-asciidoc, v0.12.0
language-plantuml, v0.2.0
plantuml-preview, v0.11.0

# Dev
No dev packages
tekkies commented 8 years ago

Having just restarted Atom again, I get "Verify 'PlantUML Jar Location' in settings."

I set the path to the jar (without double quotes!) and it seems to be working now.

peele commented 8 years ago

Initial issue: Sounds like something might not be correct in the 'Use Temp Directory' setting or handling. I'll look into it.

Comment: I can update the setting description for paths to include a note about the quotes or strip the characters off. Not sure what approach other packages take with file paths.

tekkies commented 8 years ago

Seems the error is caused by the PlantUML jar location being incorrect, but the message just says that there was no resultant svg. Maybe if there's no svg for the preview, check the JAR location is valid report a JAR missing error instead of report-not-generated. Just a thought.

peele commented 8 years ago

I see the issue. I attempt to detect if the JAR path is incorrect but it doesn't work if it is incorrect on the first attempt:

screen shot 2016-01-10 at 9 39 33 am

What I was expecting to see:

screen shot 2016-01-10 at 9 42 12 am

But that only works if the file is present. I'll rework that logic.

tekkies commented 8 years ago

Sounds good.

peele commented 8 years ago

Think commit 437b32d63f95f9666e793a8505e8452e3060e84b handles the issue.