Osmose / advanced-open-file

Open files and folders in Atom easily.
https://atom.io/packages/advanced-open-file
Other
118 stars 20 forks source link

Uncaught TypeError: Cannot read property 'forEach' of undefined #37

Closed AJRodz88 closed 8 years ago

AJRodz88 commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.0.11 System: Microsoft Windows 10 Home Thrown From: advanced-open-file package, v0.9.2

Stack Trace

Uncaught TypeError: Cannot read property 'forEach' of undefined

At /C:/Users/AlexJ/.atom/packages/advanced-open-file/lib/advanced-open-file-view.coffee:297

TypeError: Cannot read property 'forEach' of undefined
    at C:\Users\AlexJ\.atom\packages\advanced-open-file\lib\advanced-open-file-view.coffee:179:14
    at FSReqWrap.oncomplete (fs.js:77:15)

Commands

     -0:02.9.0 advanced-open-file:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "advanced-open-file": {
    "createFileInstantly": true,
    "defaultInputValue": "Project root"
  }
}

Installed Packages

# User
advanced-open-file, v0.9.2
atom-alignment, v0.12.1
change-case, v0.6.0
emmet, v2.3.12
jshint, v1.7.0

# Dev
No dev packages
Osmose commented 9 years ago

Thanks for the report!

I just put up a pull request / branch https://github.com/Osmose/advanced-open-file/pull/39 that adds a more detailed error message instead of failing when this happens. Would you be able to pull down that branch and test it out to see what specific error message you get? That'd help determine if you're simply running into a permissions issue, in which case the PR is the solution, or if there's another problem that we have to handle in addition to showing the message.

Osmose commented 8 years ago

I released a rewrite that made huge changes to the code throwing this error, and #64 changes the plugin to ignore all errors when stat-ing files, which includes permission errors. Given those two things, I'm marking this closed, but feel free to reopen and clarify if the new version is causing any more issues. Thanks!