ide-css icon indicating copy to clipboard operation
ide-css copied to clipboard

Uncaught Error: Connection is closed.

Open emelendez opened this issue 7 years ago • 11 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.0 x64 Electron: 1.6.9 OS: Unknown Windows version Thrown From: ide-css package 0.2.0

Stack Trace

Uncaught Error: Connection is closed.

At C:\Users\emelendez\.atom\packages\ide-css\node_modules\vscode-jsonrpc\lib\main.js:606

Error: Connection is closed.
    at /packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:131:28)
    at throwIfClosedOrDisposed (/packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:606:19)
    at Object.sendNotification (/packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:660:13)
    at LanguageClientConnection._sendNotification (/packages/ide-css/node_modules/atom-languageclient/build/lib/languageclient.js:244:15)
    at LanguageClientConnection.didChangeWatchedFiles (/packages/ide-css/node_modules/atom-languageclient/build/lib/languageclient.js:145:10)
    at ServerManager.projectFilesChanged (/packages/ide-css/node_modules/atom-languageclient/build/lib/server-manager.js:262:33)
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.21.0/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.21.0/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at ~/AppData/Local/atom/app-1.21.0/resources/app/src/project.js:297:40
    at PathWatcher.onNativeEvents (~/AppData/Local/atom/app-1.21.0/resources/app/src/path-watcher.js:671:15)
    at ~/AppData/Local/atom/app-1.21.0/resources/app/src/path-watcher.js:567:31
    at Function.module.exports.Emitter.simpleDispatch (~/AppData/Local/atom/app-1.21.0/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (~/AppData/Local/atom/app-1.21.0/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at NativeWatcher.onEvents (~/AppData/Local/atom/app-1.21.0/resources/app/src/path-watcher.js:448:26)
    at handler (~/AppData/Local/atom/app-1.21.0/resources/app/src/path-watcher.js:177:15)

Commands

     -1:07.5.0 editor:toggle-line-comments (input.hidden-input)
     -1:04.5.0 core:save (input.hidden-input)
     -0:44 core:undo (input.hidden-input)
     -0:40.4.0 core:save (input.hidden-input)
     -0:22.2.0 build:trigger (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-css-clean 2.23.0 
atom-ide-ui 0.4.0 
build 0.69.0 
build-gulp 0.11.0 
compare-files 0.8.1 
cssnano 1.1.0 
file-icons 2.1.12 
gulp-control 0.5.0 
ide-css 0.2.0 
ide-html 0.3.0 
ide-json 0.1.0 
ide-typescript 0.6.1 
language-asp 1.0.0 
language-babel undefined 
language-hjson 0.5.0 
language-javascript-jsx 0.3.7 
linter 2.2.0 
linter-sass-lint 1.8.2 
linter-stylelint 4.0.2 
linter-ui-default 1.6.10 
minimap 4.29.7 
pigments 0.40.2 
platformio-ide-terminal 2.7.0 
prettier-atom 0.40.0 
project-manager 3.3.5 
Remote-FTP 1.2.4 
sass-autocompile 0.13.3 
sourcerer 2.0.0 
Sublime-Style-Column-Selection 1.7.4 
sync-settings 0.8.3 

emelendez avatar Oct 09 '17 11:10 emelendez

@emelendez does this stills happens after terminating Atom app then start Atom again? If so, did you have opened file when Atom just started?

liuderchi avatar Oct 09 '17 13:10 liuderchi

I'm experiencing the same issue.

STR:

  1. Save a file
  2. Type in a file
  3. After an inordinate amount of time the error will consistently trigger the Atom Bug window to pop up over and over again.

Atom: 1.21.1 x64 Electron: 1.6.15 OS: Mac OS X 10.12.5 Thrown From: ide-css package 0.2.0

Stack Trace

Uncaught Error: Connection is closed.

At /Users/seanho/.atom/packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:606

Error: Connection is closed.
    at /packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:131:28)
    at throwIfClosedOrDisposed (/packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:606:19)
    at Object.sendNotification (/packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:660:13)
    at LanguageClientConnection._sendNotification (/packages/ide-css/node_modules/atom-languageclient/build/lib/languageclient.js:244:15)
    at LanguageClientConnection.didChangeTextDocument (/packages/ide-css/node_modules/atom-languageclient/build/lib/languageclient.js:133:10)
    at TextEditorSyncAdapter.sendFullChanges (/packages/ide-css/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:183:22)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:626:38
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:141:34)
    at DisplayLayer.emitDidChangeSyncEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:825:24)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:780:35
    at Map.forEach (native)
    at TextBuffer.module.exports.TextBuffer.emitDidChangeEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:779:47)
    at TextBuffer.module.exports.TextBuffer.applyChange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:762:18)
    at TextBuffer.module.exports.TextBuffer.revertToCheckpoint (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1001:22)
    at TextBuffer.module.exports.TextBuffer.transact (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:955:20)
    at TextEditor.module.exports.TextEditor.transact (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1673:32)
    at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1234:30
    at TextEditor.module.exports.TextEditor.mergeSelections (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2617:49)
    at TextEditor.module.exports.TextEditor.mergeIntersectingSelections (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:2583:41)
    at TextEditor.module.exports.TextEditor.mutateSelectedText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1232:25)
    at TextEditor.module.exports.TextEditor.insertText (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1198:25)
    at TextEditor.object.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/node_modules/underscore-plus/lib/underscore-plus.js:77:33)
    at /packages/language-babel/lib/did-insert-text.coffee:80:18)
    at TextEditorComponent.didTextInput (/Applications/Atom.app/Contents/Resources/app/src/text-editor-component.js:1630:30)

Commands

     -9:06.2.0 core:confirm (input.hidden-input)
  8x -8:32.9.0 core:backspace (input.hidden-input)
     -8:24.4.0 core:confirm (input.hidden-input)
     -5:40.1.0 core:save (input.hidden-input)
     -2:30.1.0 fuzzy-finder:toggle-file-finder (input.hidden-input)
     -2:28.6.0 core:confirm (input.hidden-input)
  2x -1:50.3.0 find-and-replace:select-next (input.hidden-input)
     -1:32.5.0 editor:consolidate-selections (input.hidden-input)
     -1:32.5.0 core:cancel (input.hidden-input)
     -1:32 editor:consolidate-selections (input.hidden-input)
     -1:32 core:cancel (input.hidden-input)
     -1:30.1.0 editor:consolidate-selections (input.hidden-input)
     -1:30.1.0 core:cancel (input.hidden-input)
     -1:29.7.0 editor:consolidate-selections (input.hidden-input)
     -1:29.7.0 core:cancel (input.hidden-input)

Non-Core Packages

align-regexp 0.4.0 
alignment 1.1.5 
atom-clock 0.1.15 
atom-ide-ui 0.5.1 
atom-monokai 0.10.9 
busy-signal 1.4.3 
declarations 1.1.3 
declarations-js 1.0.2 
docblockr 0.11.0 
dracula-syntax 2.0.5 
elixir-pry 1.0.0 
emmet 2.4.3 
fold-search-results 1.0.5 
git-blame 1.3.1 
git-time-machine 1.5.9 
goto-definition 1.3.4 
ide-css 0.2.0 
ide-html 0.3.0 
ide-typescript 0.6.2 
ide-yaml 0.3.2 
imdone-atom 2.2.7 
intentions 1.1.5 
language-babel 2.75.1 
language-documentation 2.0.1 
language-elixir 0.20.3 
language-ember 4.0.2 
language-ember-htmlbars 0.4.0 
lines 0.13.1 
linter 2.2.0 
linter-csslint 2.0.0 
linter-elixirc 1.7.0 
linter-eslint 8.3.2 
linter-jshint 3.1.6 
linter-sass-lint 1.8.2 
linter-ui-default 1.6.10 
minimap 4.29.7 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-pigments 0.2.2 
monokai 0.24.0 
monokai-seti 0.9.0 
pigments 0.40.2 
project-manager 3.3.5 
related 0.3.5 
seti-syntax 1.1.3 
seti-ui 1.9.0 
sort-lines 0.18.0 
synced-sidebar 0.4.3 
todo-show 2.1.0 

seanmhoffman avatar Oct 12 '17 22:10 seanmhoffman

@seanmhoffman Does it always happen whenever you start Atom? If so, how many css files opened when Atom just started?

liuderchi avatar Oct 13 '17 01:10 liuderchi

@liuderchi It happens randomly after Atom has been launch sometimes I'm able to edit a file for a few minutes before the error happens. I actually have zero css files open which was one thing that surprised me, the other being that even after disabling and uninstalling the package the error still occurs. As of the moment I'm constantly having to restart Atom every few minutes because the editor becomes unusable and won't respond to any input after the error has occurred.

seanmhoffman avatar Oct 13 '17 18:10 seanmhoffman

@seanmhoffman sorry for the inconvenience.

Please try these steps to remove cached storage as temporarily workaround. Similar issues happen in ide-yaml, ide-html. We are trying to figure it out.

liuderchi avatar Oct 14 '17 14:10 liuderchi

@liuderchi Thank you, I followed the instructions and blew away both directories. Both ~/Library/Application Support/Atom and ~/Library/Saved Application State/com.github.atom.com and the error happens less occasionally but it still persists.

seanmhoffman avatar Oct 16 '17 22:10 seanmhoffman

Happens to me as well On Save

.atom/packages/ide-css/node_modules/vscode-jsonrpc/lib/main.js:606

Atom 1.21.1 ide-css 0.2.0

Thanks!

nrigaudiere avatar Nov 03 '17 09:11 nrigaudiere

@seanmhoffman I came across similar issue for ide-typescript and found an simple workaround.

Remove all opened css files (files consumed by your ide-* ) in the window then do Window: Reload

https://github.com/atom/ide-typescript/issues/17#issuecomment-349586788

liuderchi avatar Dec 13 '17 02:12 liuderchi

@liuderchi that workaround does not work for me, as I have no open css files - any updates on when this might be fixed? I love the package, just not the error.

JerrySievert avatar Mar 16 '18 18:03 JerrySievert

note that disabling the package apparently does not make the issue go away :(

JerrySievert avatar Mar 16 '18 18:03 JerrySievert

@JerrySievert sorry for the late reply and the inconvenience. 😢

Theoretically latest release of ide-css prevent this issue happens.

But there might be some edge cases. Please help provide debug info via these steps.

liuderchi avatar Mar 18 '18 12:03 liuderchi