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. on invalid enum field in config #21

Open
alex35mil opened this issue Mar 11, 2018 · 4 comments
Open

Comments

@alex35mil
Copy link
Contributor

Sometimes when I type not fast enough in diagnostics.tools field (e.g. bsb, merl) I get hard error Uncaught Error: Connection is closed..

Something to investigate.


Atom: 1.24.1 x64
Electron: 1.6.16
OS: Mac OS X 10.12.6
Thrown From: ide-reason package 0.1.12

Stack Trace

Uncaught Error: Connection is closed.

At /Users/Alex/.atom/packages/ide-reason/node_modules/vscode-jsonrpc/lib/main.js:613

Error: Connection is closed.
    at /packages/ide-reason/node_modules/vscode-jsonrpc/lib/main.js:138:28)
    at throwIfClosedOrDisposed (/packages/ide-reason/node_modules/vscode-jsonrpc/lib/main.js:613:19)
    at Object.sendNotification (/packages/ide-reason/node_modules/vscode-jsonrpc/lib/main.js:667:13)
    at LanguageClientConnection._sendNotification (/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/languageclient.js:341:19)
    at LanguageClientConnection.didChangeConfiguration (/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/languageclient.js:120:14)
    at _disposable.add.atom.config.observe (/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/auto-languageclient.js:262:36)
    at /Applications/Atom.app/Contents/Resources/app/src/config.js:676:22
    at /Applications/Atom.app/Contents/Resources/app/src/config.js:693:26
    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 Config.module.exports.Config.emitChangeEvent (/Applications/Atom.app/Contents/Resources/app/src/config.js:884:35)
    at Config.module.exports.Config.setRawValue (/Applications/Atom.app/Contents/Resources/app/src/config.js:670:25)
    at Config.module.exports.Config.set (/Applications/Atom.app/Contents/Resources/app/src/config.js:248:20)
    at SettingsPanel.set (/Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/settings-panel.js:237:27)
    at /Applications/Atom.app/Contents/Resources/app/node_modules/settings-view/lib/settings-panel.js:315:24
    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 TextBuffer.module.exports.TextBuffer.emitDidStopChangingEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:1724:26)
    at later (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/helpers.js:28:13)

Non-Core Packages

advanced-open-file 0.16.8 
atom-ide-ui 0.9.3 
autocomplete-modules 1.12.0 
color-picker 2.2.5 
cursor-history 0.13.1 
custom-title 1.0.1 
file-icons 2.1.17 
flex-tool-bar 1.1.0 
git-blame 1.6.0 
go-plus 5.8.2 
go-signature-statusbar 1.2.3 
highlight-selected 0.13.1 
ide-flowtype 0.22.1 
ide-reason 0.1.12 
ide-typescript 0.7.5 
language-applescript 0.3.0 
language-babel 2.84.0 
language-docker 1.1.8 
language-jade 0.7.3 
language-nginx 0.8.0 
language-ocaml 1.9.5 
language-pug 0.0.22 
language-reason 0.0.4 
language-slim 1.0.0 
language-swift 0.5.0 
linter 2.2.0 
linter-docker 0.3.0 
linter-eslint 8.4.1 
linter-scss-lint 3.1.1 
linter-stylelint 4.2.0 
maximize-panes 0.2.0 
minima-syntax 0.0.2 
minima-ui 0.0.4 
nice-index 1.0.5 
pg-formatter 0.0.1 
prettier-atom 0.51.0 
reason-refmt 0.3.3 
set-syntax 0.4.0 
todo-show 2.2.0 
tool-bar 1.1.6 
vim-mode-plus 1.30.0 
zentabs 0.8.9 
@zaaack
Copy link
Member

zaaack commented Mar 12, 2018

Looks like it's because the atom-languageclient watches the plugin config changes very fast, and read some uncompleted input.

@alex35mil
Copy link
Contributor Author

atom/atom-languageclient#194

@zaaack
Copy link
Member

zaaack commented Mar 13, 2018

Sorry that I didn't look your error stack before, the stack contains some from ide-flowtype, not ide-reason, it's strange, but I didn't find some clue after a quick look at ide-flowtype's source, I guess it's still caused by atom-languageclient.

at LanguageClientConnection._sendNotification (/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/languageclient.js:341:19)
at LanguageClientConnection.didChangeConfiguration (/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/languageclient.js:120:14)
at _disposable.add.atom.config.observe (/packages/ide-flowtype/node_modules/atom-languageclient/build/lib/auto-languageclient.js:262:36)
at /Applications/Atom.app/Contents/Resources/app/src/config.js:676:22

@alex35mil
Copy link
Contributor Author

Yeah, I checked ide-flowtype sources as well and it doesn't seem related to their FlowLanguageClient class.

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

No branches or pull requests

2 participants