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. #8

Open cdeyoung opened 9 years ago

cdeyoung commented 9 years ago

[Enter steps to reproduce below:]

  1. Open an Elixir .ex file in Atom.
  2. Type some Elixir code.
  3. Save the file. The error always happens when saving.

Atom Version: 0.201.0 System: Mac OS X 10.10.3 Thrown From: autocomplete-elixir package, v1.2.6

Stack Trace

Uncaught Error: This socket is closed.

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

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/clinton/.atom/packages/autocomplete-elixir/lib/alchemide/wrapper.coffee:66:9)
    at /Users/clinton/.atom/packages/autocomplete-elixir/lib/autocomplete-elixir-client.coffee:21:31
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:985:20)

Commands

     -1:11.8.0 core:move-right (atom-text-editor.editor.is-focused)
     -1:09.4.0 core:backspace (atom-text-editor.editor.is-focused)
  3x -0:57.7.0 core:move-right (atom-text-editor.editor.is-focused)
     -0:40.2.0 editor:newline-below (atom-text-editor.editor.is-focused)
  3x -0:36 core:backspace (atom-text-editor.editor.is-focused)
     -0:33.9.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:33.9.0 core:cancel (atom-text-editor.editor.is-focused)
  6x -0:32.5.0 core:move-down (atom-text-editor.editor.is-focused)
  2x -0:31.4.0 editor:newline (atom-text-editor.editor.is-focused)
  6x -0:17.5.0 core:move-up (atom-text-editor.editor.is-focused)
  5x -0:16.2.0 core:move-right (atom-text-editor.editor.is-focused)
  2x -0:14.9.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -0:06.5.0 core:move-up (atom-text-editor.editor.is-focused)
  3x -0:05.5.0 core:move-left (atom-text-editor.editor.is-focused)
  4x -0:03.3.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:00.6.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "seti-syntax"
    ]
  }
}

Installed Packages

# User
autocomplete-elixir, v1.2.6
autocomplete-ruby, v0.1.0
color-picker, v1.7.0
elixir-cmd, v0.2.6
iex, v0.9.6
keybinding-cheatsheet, v0.0.9
language-elixir, v0.4.0
language-haml, v0.20.0
linter-elixirc, v0.2.1
linter-ruby, v0.1.6
minimap, v4.9.0
ruby-block, v0.3.3
ruby-slim, v0.2.0
script, v2.23.0
seti-syntax, v0.4.0
seti-ui, v0.7.1

# Dev
No dev packages
goliatone commented 9 years ago

Same issue here

Atom Version: 0.201.0 System: Mac OS X 10.9.5 Thrown From: autocomplete-elixir package, v1.2.6

Stack Trace

Uncaught Error: This socket is closed.

At /Users/goliatone/Downloads/SOFTWARE/Atom.app/Contents/Resources/app.asar/src/pane.js:759

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/goliatone/.atom/packages/autocomplete-elixir/lib/alchemide/wrapper.coffee:66:9)
    at /Users/goliatone/.atom/packages/autocomplete-elixir/lib/autocomplete-elixir-client.coffee:21:31
    at Emitter.module.exports.Emitter.emit (/Users/goliatone/Downloads/SOFTWARE/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Users/goliatone/Downloads/SOFTWARE/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:985:20)

Commands

     -2:26.2.0 window:install-shell-commands (atom-notification.error.icon.icon-flame.native-key-bindings.has-close)
     -1:39.7.0 application:open (atom-text-editor.editor.is-focused)
  2x -1:26.7.0 core:save (atom-text-editor.editor.is-focused)
     -0:15 core:select-all (atom-text-editor.editor.is-focused)
     -0:11.3.0 fuzzy-finder:toggle-file-finder (atom-text-editor.editor.is-focused)
     -0:06.8.0 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:06.8.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:05.7.0 application:new-file (atom-text-editor.editor.is-focused)
     -0:03.1.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  }
}

Installed Packages

# User
autoclose-html, v0.16.2
autocomplete-elixir, v1.2.6
language-elixir, v0.4.0
linter-elixirc, v0.2.1

# Dev
No dev packages
patrickbrown-dev commented 9 years ago

Same issue here.

michaelowens commented 9 years ago

Same here. Also seems to do this every letter I type.

Atom Version: 0.205.0 System: Mac OS X 10.10.3 Thrown From: autocomplete-elixir package, v1.3.0

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/michaelowens/.atom/packages/autocomplete-elixir/lib/alchemide/wrapper.coffee:66:9)
    at /Users/michaelowens/.atom/packages/autocomplete-elixir/lib/autocomplete-elixir-client.coffee:21:31
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1032:20)

Also, atom starts with the following error:

Uncaught BufferedProcessError: Failed to spawn command `elixir`. Make sure `elixir` is installed and on your PATH
/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js
xurde commented 9 years ago

Also happened to me.

FilterKaapi commented 9 years ago

In Mac OS X 10.10.3, this issue got solved for me by starting atom from the terminal. I guess this is because it requires access to the PATH variables. For this it is necessary to start atom from the terminal by typing atom

wende commented 9 years ago

atom/atom/issues/6956

bingocaller commented 9 years ago

UPDATE: Restarting Atom did the trick in my case. It seems the issue is indeed related to the loading of the elixir executable.


This also happens to me. I did however start Atom from the command line and added the absolute elixir path in the settings.

Atom Version: 1.0.11 System: Mac OS X 10.10.5 Thrown From: autocomplete-elixir package, v1.3.12

Stack Trace

Uncaught Error: This socket is closed.

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

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/Jesper/.atom/packages/autocomplete-elixir/lib/alchemide/wrapper.coffee:54:7)
  at /Users/Jesper/.atom/packages/autocomplete-elixir/lib/autocomplete-elixir-client.coffee:14:22
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1038:20)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1005:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:584:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:547:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:530:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:609:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:293:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:245:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:184:20)

Commands

     -0:04.6.0 vim-mode:activate-insert-mode (atom-text-editor.editor.vim-mode.normal-mode.is-focused)
     -0:04.4.0 core:paste (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
     -0:02.9.0 core:move-up (atom-text-editor.editor.vim-mode.is-focused.insert-mode)
     -0:01.5.0 core:save (atom-text-editor.editor.vim-mode.is-focused.insert-mode)

Config

{
  "autocomplete-elixir": {
    "elixirPath": "/usr/local/bin/elixir"
  }
}

Installed Packages

# User
atom-beautify, v0.28.11
autocomplete-elixir, v1.3.12
color-picker, v2.0.11
file-icons, v1.6.9
formatter, v2.12.3
formatter-coffeescript, v0.1.1
jquery-snippets, v11.0.0
language-SCSS, v0.4.0
language-elixir, v0.5.2
linter, v1.5.0
linter-erb, v0.1.1
linter-jshint, v1.1.5
linter-ruby, v1.1.1
linter-scss-lint, v2.0.0
minimap, v4.13.2
pigments, v0.13.2
save-session, v0.15.7
vim-mode, v0.60.0
vim-mode-visual-block, v0.2.13
vim-surround, v0.8.0

# Dev
No dev packages