Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Connection is closed. #9

Open
ronnyvv opened this issue Oct 4, 2017 · 14 comments
Open

Uncaught Error: Connection is closed. #9

ronnyvv opened this issue Oct 4, 2017 · 14 comments

Comments

@ronnyvv
Copy link

ronnyvv commented Oct 4, 2017

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.0 x64
Electron: 1.6.9
OS: "Fedora release
Thrown From: ide-html package 0.3.0

Stack Trace

Uncaught Error: Connection is closed.

At /home/rvindenes/.atom/packages/ide-html/node_modules/vscode-jsonrpc/lib/main.js:606

Error: Connection is closed.
    at /packages/ide-html/node_modules/vscode-jsonrpc/lib/main.js:131:28)
    at throwIfClosedOrDisposed (/packages/ide-html/node_modules/vscode-jsonrpc/lib/main.js:606:19)
    at Object.sendNotification (/packages/ide-html/node_modules/vscode-jsonrpc/lib/main.js:660:13)
    at LanguageClientConnection._sendNotification (/packages/ide-html/node_modules/atom-languageclient/build/lib/languageclient.js:244:15)
    at LanguageClientConnection.didChangeTextDocument (/packages/ide-html/node_modules/atom-languageclient/build/lib/languageclient.js:133:10)
    at TextEditorSyncAdapter.sendFullChanges (/packages/ide-html/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:183:22)
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /usr/share/atom/resources/app/src/text-editor.js:626:38
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/text-buffer/node_modules/event-kit/lib/emitter.js:141:34)
    at DisplayLayer.emitDidChangeSyncEvent (/usr/share/atom/resources/app/node_modules/text-buffer/lib/display-layer.js:823:24)
    at decorationLayerDisposable.textDecorationLayer.onDidInvalidateRange (/usr/share/atom/resources/app/node_modules/text-buffer/lib/display-layer.js:161:20)
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at TokenizedBuffer.module.exports.TokenizedBuffer.tokenizeNextChunk (/usr/share/atom/resources/app/src/tokenized-buffer.js:241:28)
    at /usr/share/atom/resources/app/src/tokenized-buffer.js:206:32
    at /usr/share/atom/resources/app/node_modules/underscore/underscore.js:666:53

Commands

     -8:46.8.0 core:close (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-ide-ui 0.4.0 
atom-ternjs 0.18.3 
autocomplete-modules 1.7.2 
busy-signal 1.4.3 
editorconfig 2.2.2 
file-icons 2.1.12 
fonts 3.0.3 
git-blame 1.3.1 
git-time-machine 1.5.9 
gl-light-syntax 3.0.0 
ide-css 0.2.0 
ide-html 0.3.0 
ide-json 0.1.0 
ide-typescript 0.6.1 
intentions 1.1.5 
language-babel 2.75.1 
linter 2.2.0 
linter-eslint 8.3.2 
pigments 0.40.2 
project-manager 3.3.5 
project-sidebar 1.3.0 
sync-settings 0.8.3 
@liuderchi
Copy link
Owner

@ronnyvv does this stills happens after doing an app termination then start Atom again?
If so, did you have opened file when Atom just started?

@liuderchi liuderchi added the bug label Oct 4, 2017
@ronnyvv
Copy link
Author

ronnyvv commented Oct 4, 2017

No, after restarting Atom I couldn't reproduce it with the same project. (I had a lot of files open (in tabs) for a long time when it did trigger)

@liuderchi
Copy link
Owner

@ronnyvv

  1. Perhaps you remember the last operation you did before the red
    --- Uncaught Error: Connection is closed. --- notification popped up?
  2. currently this package lacks connection exception handling mechanism. Will add feature for enhancement

@ronnyvv
Copy link
Author

ronnyvv commented Oct 4, 2017

It happened when closing a tab. I tried closing different tabs, including Close All Tabs from the menu and they all triggered the same exception.

@seanmhoffman
Copy link

seanmhoffman commented Oct 18, 2017

Hey @liuderchi, I was able to clear out the ide-css cached code to prevent this same error happening with that package. Unfortunately, now it seems to be happening with ide-html. This error only seems to occur when I have a project open that has either css or html files included. I don't even necessarily have to have the files open in the editor just the project for this error to occur.

@liuderchi
Copy link
Owner

@ronnyvv sorry for the inconvenience.

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

@liuderchi
Copy link
Owner

liuderchi commented Oct 19, 2017

... prevent this same error happening with that package.
Unfortunately, now it seems to be happening with ide-html.

@seanmhoffman IMO this issue is possibly related to package atom-language-client
which ide-html, ide-css, ide-yaml are ALL built upon.

Plus, there are similar issues for official ide packages also depending on atom-language-client:

Other community ide-* packages

@seanmhoffman
Copy link

@liuderchi That seems pretty likely that atom-language-client might be the underlying cause. I've uninstalled all of the ide-* packages in the meantime until the issue is resolved.

I have some free time next week that should allow me to take a deeper look at what is happening. Anything I find or solutions I come across I'll let you know.

@damieng
Copy link

damieng commented Oct 27, 2017

Yeah we're seeing this across all ide-x packages. I wish I knew what was causing it. If anyone finds a solid repro please @ me so I can get on it.

@liuderchi
Copy link
Owner

@damieng FYI:
This similar issue from ide-ruby#1 is talking about one solid repro from language_server-ruby by early typing before all parsing is done.

@NullVoxPopuli
Copy link

Just started happening for me. Seems to be sleep/hibernate caused? idk

@liuderchi
Copy link
Owner

@NullVoxPopuli please try the following workaround

  1. dispatch command Application: Open Your Config
  2. add debugLSP: true under core property then save
  3. dispatch command Window: Toggle Dev Tools navigate to console tag
  4. close all opened files
  5. dispatch command Window: reload wait for a while
  6. until no anymore log message from ide-html, open one html file

@davidnewhall
Copy link

I get this error even after uninstalling the ide-html package, with puppet files open. Very strange. The error pops up every time I type any key (add a space for instance). No idea how to make it stop or go away. It's constant and unending. :(

@liuderchi
Copy link
Owner

@davidnewhall If you are using macOS please try these steps to clear Atom cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants