wende / autocomplete-elixir

Intelligent Elixir autocompletion provider for Atom autocomplete-plus
MIT License
42 stars 11 forks source link

'Uncaught Error: This socket is closed' when saving any elixir file #5

Closed TattdCodeMonkey closed 9 years ago

TattdCodeMonkey commented 9 years ago

With autocomplete-elixir package enabled I receive an uncaught error whenever I save an elixir file. I've seen this on two different machines. one running OSX 10.10.2 and another running 10.9

Steps to Reproduce

  1. Open elixir project in Atom
  2. make a change to any .ex file
  3. save file

Atom Version: 0.190.0 System: Mac OS X 10.10.2 Thrown From: autocomplete-elixir package, v1.2.4

Stack Trace

Uncaught Error: This socket is closed.

At /Applications/Atom.app/Contents/Resources/app/src/pane.js:734

Error: This socket is closed.
  at Socket._writeGeneric (net.js:634:19)
  at Socket._write (net.js:687:8)
  at doWrite (_stream_writable.js:295:12)
  at writeOrBuffer (_stream_writable.js:282:5)
  at Socket.Writable.write (_stream_writable.js:210:11)
  at Socket.write (net.js:612:40)
  at Object.exports.loadFile (/Users/rnorris/.atom/packages/autocomplete-elixir/lib/alchemide/wrapper.coffee:33:7)
  at /Users/rnorris/.atom/packages/autocomplete-elixir/lib/autocomplete-elixir-client.coffee:14:22
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:917:20)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:899:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:556:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:502:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:485:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:574:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:310:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:242:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:521:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:356:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:180:20)

Commands

     -4:27.0 window:update-available (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-atom-dark-syntax.theme-atom-dark-ui)
  2x -3:41.1 core:confirm (atom-text-editor.editor.mini)
     -2:33.9 core:backspace (atom-text-editor.editor.mini)
     -2:26.7 core:confirm (atom-text-editor.editor.mini)
  6x -1:56.8 core:backspace (atom-text-editor.editor.mini)
     -1:54.2 core:confirm (atom-text-editor.editor.mini)
  4x -1:26.6 core:backspace (atom-text-editor.editor.mini)
  3x -1:23.6 core:confirm (atom-text-editor.editor.mini)
     -0:10.3 editor:newline (atom-text-editor.editor.is-focused)
 10x -0:08.5 core:backspace (atom-text-editor.editor.is-focused)
     -0:00.7 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "atom-dark-syntax"
    ]
  },
  "autocomplete-elixir": {}
}

Installed Packages

# User
autocomplete-elixir, v1.2.4
autocomplete-plus, v2.12.0
autocomplete-snippets, v1.2.0
language-elixir, v0.4.0
pretty-json, v0.3.3

# Dev
No dev packages
wende commented 9 years ago

Please try if there's any difference in new version. I couldn't reproduce the error on any of my machines

TattdCodeMonkey commented 9 years ago

I'll update and see if this changes anything. Still happens.

I think this is an atom issue. If I open atom from the command-line it works fine. Opening from Taskbar, Lauchpad or spotlight I see the above error. Its something weird with atom not loading PATH unless its opened from the terminal.

wende commented 9 years ago

It might be something about node's child_process.spawn method. I've changed it to BufferedProcess of atom API

2015-05-19 16:14 GMT+02:00 Rodney Norris notifications@github.com:

I'll update and see if this changes anything.

I think this is an atom issue. If I open atom from the command-line it works fine. Opening from Taskbar, Lauchpad or spotlight I see the above error. Its something weird with atom not loading PATH unless its opened from the terminal.

— Reply to this email directly or view it on GitHub https://github.com/iraasta/autocomplete-elixir/issues/5#issuecomment-103514572 .

Krzysztof Wende Neon Tree Solutions Ltd. http://neontree.pl