izuzak / atom-pdf-view

Support for viewing PDF files in Atom.
https://atom.io/packages/pdf-view
MIT License
106 stars 30 forks source link

Uncaught Error: ENOENT: no such file or directory, open '.../presentation.pdf' #77

Closed devurandom closed 8 years ago

devurandom commented 8 years ago

[Enter steps to reproduce below:]

  1. Compile a TeX file using atom-latex (ctrl+alt+B), which will invoke atom-pdf-view
  2. Delete the generated (and currently visible) PDF file, e.g. from the terminal

Atom Version: 1.0.15 System: "Gentoo Base Thrown From: pdf-view package, v0.25.0

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open '.../presentation.pdf'

At fs.js:97

Error: ENOENT: no such file or directory, open '.../presentation.pdf'
  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:384:29)
  at PdfEditorView.module.exports.PdfEditorView.updatePdf (~/.atom/packages/pdf-view/lib/pdf-editor-view.coffee:110:33)
  at ~/.atom/packages/pdf-view/lib/pdf-editor-view.coffee:44:12
  at later (/usr/share/atom/resources/app.asar/node_modules/underscore-plus/node_modules/underscore/underscore.js:724:25)

Commands

  2x -7:45.2.0 core:backspace (atom-text-editor.editor.is-focused)
     -7:42.2.0 core:save (atom-text-editor.editor.is-focused)
     -7:41.4.0 latex:build (atom-text-editor.editor.is-focused)
     -6:58.4.0 core:move-right (atom-text-editor.editor.is-focused)
     -5:54.3.0 core:save (atom-text-editor.editor.is-focused)
     -4:15 latex:build (atom-text-editor.editor.is-focused)
  2x -3:34.3.0 core:delete (atom-text-editor.editor.is-focused)
     -3:14.4.0 core:backspace (atom-text-editor.editor.is-focused)
     -3:12.1.0 core:save (atom-text-editor.editor.is-focused)
  2x -2:38.3.0 latex:build (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "linter-chktex",
      "tree-view"
    ]
  }
}

Installed Packages

# User
hyperclick, v0.0.32
language-latex, v0.6.1
language-lua, v0.9.4
language-pfm, v0.82.0
language-rust, v0.4.5
latex, v0.25.1
latexer, v0.2.7
linter, v1.6.0
linter-clojure, v1.0.0
linter-lua, v1.0.0
linter-luacheck, v1.1.2
linter-rust, v0.2.9
markdown-preview-plus, v2.1.1
nuclide-arcanist, v0.0.32
nuclide-blame, v0.0.32
nuclide-blame-provider-hg, v0.0.32
nuclide-blame-ui, v0.0.32
nuclide-buck-files, v0.0.32
nuclide-clang-atom, v0.0.32
nuclide-code-format, v0.0.32
nuclide-debugger-atom, v0.0.32
nuclide-debugger-hhvm, v0.0.32
nuclide-debugger-lldb, v0.0.32
nuclide-diagnostics-store, v0.0.32
nuclide-diagnostics-ui, v0.0.32
nuclide-diff-view, v0.0.32
nuclide-file-tree, v0.0.32
nuclide-file-tree-deux, v0.0.32
nuclide-file-watcher, v0.0.32
nuclide-find-references, v0.0.32
nuclide-flow, v0.0.32
nuclide-fuzzy-filename-provider, v0.0.32
nuclide-hack, v0.0.32
nuclide-hack-symbol-provider, v0.0.32
nuclide-hg-repository, v0.0.32
nuclide-installer, v0.0.32
nuclide-language-hack, v0.0.32
nuclide-objc, v0.0.32
nuclide-ocaml, v0.0.32
nuclide-open-filenames-provider, v0.0.32
nuclide-quick-open, v0.0.32
nuclide-remote-projects, v0.0.32
nuclide-test-runner, v0.0.32
nuclide-toolbar, v0.0.32
nuclide-type-hint, v0.0.32
pdf-view, v0.25.0
preview-inline, v0.4.4

# Dev
No dev packages
izuzak commented 8 years ago

I just published a new version -- can you try updating to 0.26.0 and see if you can reproduce? Thanks

devurandom commented 8 years ago

Sadly: Yes, I can reproduce.

Atom Version: 1.0.15 System: "Gentoo Base Thrown From: pdf-view package, v0.26.0

Stack Trace

Uncaught Error: ENOENT: no such file or directory, open '.../presentation.pdf'

At fs.js:97

Error: ENOENT: no such file or directory, open '.../presentation.pdf'
  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:384:29)
  at PdfEditorView.module.exports.PdfEditorView.updatePdf (~/.atom/packages/pdf-view/lib/pdf-editor-view.coffee:105:5)
  at ~/.atom/packages/pdf-view/lib/pdf-editor-view.coffee:44:12
  at later (/usr/share/atom/resources/app.asar/node_modules/underscore-plus/node_modules/underscore/underscore.js:724:25)

Commands

     -7:22.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -7:20.2.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
  2x -4:20.8.0 latex:build (atom-text-editor.editor.is-focused)
     -3:19.1.0 core:save (atom-text-editor.editor.is-focused)
     -3:17.3.0 latex:build (atom-text-editor.editor.is-focused)
     -2:33.4.0 core:save (atom-text-editor.editor.is-focused)
  2x -2:32.4.0 latex:build (atom-text-editor.editor.is-focused)
  2x -1:32.7.0 core:backspace (div.pdf-view)
     -1:27.8.0 core:save (atom-text-editor.editor.is-focused)
     -1:26.6.0 latex:build (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "disabledPackages": [
      "linter-chktex",
      "tree-view"
    ]
  }
}

Installed Packages

# User
hyperclick, v0.0.32
language-latex, v0.6.1
language-lua, v0.9.4
language-pfm, v0.82.0
language-rust, v0.4.5
latex, v0.25.1
latexer, v0.2.7
linter, v1.6.0
linter-clojure, v1.0.0
linter-lua, v1.0.0
linter-luacheck, v1.1.2
linter-rust, v0.2.9
markdown-preview-plus, v2.1.1
nuclide-arcanist, v0.0.32
nuclide-blame, v0.0.32
nuclide-blame-provider-hg, v0.0.32
nuclide-blame-ui, v0.0.32
nuclide-buck-files, v0.0.32
nuclide-clang-atom, v0.0.32
nuclide-code-format, v0.0.32
nuclide-debugger-atom, v0.0.32
nuclide-debugger-hhvm, v0.0.32
nuclide-debugger-lldb, v0.0.32
nuclide-diagnostics-store, v0.0.32
nuclide-diagnostics-ui, v0.0.32
nuclide-diff-view, v0.0.32
nuclide-file-tree, v0.0.32
nuclide-file-tree-deux, v0.0.32
nuclide-file-watcher, v0.0.32
nuclide-find-references, v0.0.32
nuclide-flow, v0.0.32
nuclide-fuzzy-filename-provider, v0.0.32
nuclide-hack, v0.0.32
nuclide-hack-symbol-provider, v0.0.32
nuclide-hg-repository, v0.0.32
nuclide-installer, v0.0.32
nuclide-language-hack, v0.0.32
nuclide-objc, v0.0.32
nuclide-ocaml, v0.0.32
nuclide-open-filenames-provider, v0.0.32
nuclide-quick-open, v0.0.32
nuclide-remote-projects, v0.0.32
nuclide-test-runner, v0.0.32
nuclide-toolbar, v0.0.32
nuclide-type-hint, v0.0.32
pdf-view, v0.26.0
preview-inline, v0.4.4

# Dev
No dev packages
izuzak commented 8 years ago

Strange. Can you reproduce the problem if you just open a PDF and then delete it from the terminal? I've never been able to reproduce this problem -- see the other issues mentioned in https://github.com/izuzak/atom-pdf-view/issues/78.

izuzak commented 8 years ago

Published a new version (0.27.0) with another approach. Mind giving that a try as well? Thanks for the help! :heart: