Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught Error: Connection is closed #60

Open
martinbean opened this issue Oct 10, 2017 · 15 comments
Open

Uncaught Error: Connection is closed #60

martinbean opened this issue Oct 10, 2017 · 15 comments

Comments

@martinbean
Copy link

This package becomes unusable for me after a few minutes of usage. I get the following in the Console:

Uncaught Error: Connection is closed.
    at new ConnectionError (/Users/martin/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:131:28)
    at throwIfClosedOrDisposed (/Users/martin/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:606:19)
    at Object.sendNotification (/Users/martin/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:660:13)
    at LanguageClientConnection._sendNotification (/Users/martin/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/languageclient.js:244:15)
    at LanguageClientConnection.didChangeWatchedFiles (/Users/martin/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/languageclient.js:145:10)
    at ServerManager.projectFilesChanged (/Users/martin/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/server-manager.js:262:33)
    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/project.js:297:40
    at PathWatcher.onNativeEvents (/Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:671:15)
    at /Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:567:31
    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 NativeWatcher.onEvents (/Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:448:26)
    at handler (/Applications/Atom.app/Contents/Resources/app/src/path-watcher.js:177:15)
I also don’t know if it’s related, but I find autocomplete and tab-completions are very laggy when I enable this package too.

Also, I don’t know if it’s related, but autocomplete and tab-completions get very laggy when this package is enabled.

@Nebulosar
Copy link

Nebulosar commented Nov 2, 2017

Dirty workaround is to disable and enable package again.
It works temporary and is not a fix but at least you don't have to close Atom.

@ghost
Copy link

ghost commented Nov 6, 2017

I've had the same issue just now - it's occured while I was trying to type some comment block (docBlock). And next the error notification was showing up on every single try to type something in my file.
As @Nebulosar mentioned - disable and reenable package solved the problem, but I don't know for how long.
In ide-php package setting I have set the Memory Limit value to 256M.

Windows 10 x64
ide-php 0.6.9
atom-ide-ui 0.5.4

@ghost
Copy link

ghost commented Nov 7, 2017

The error has been occured again, and again while typing an docBlock comment.
C:\Users\s.gruszka\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:959

Error: Connection is closed. at new ConnectionError (C:\Users\user\.atom\packages\ide-php\node_modules\vscode-jsonrpc\lib\main.js:131:28) at throwIfClosedOrDisposed (C:\Users\user\.atom\packages\ide-php\node_modules\vscode-jsonrpc\lib\main.js:606:19) at Object.sendNotification (C:\Users\user\.atom\packages\ide-php\node_modules\vscode-jsonrpc\lib\main.js:660:13) at LanguageClientConnection._sendNotification (C:\Users\user\.atom\packages\ide-php\node_modules\atom-languageclient\build\lib\languageclient.js:242:15) at LanguageClientConnection.didChangeTextDocument (C:\Users\user\.atom\packages\ide-php\node_modules\atom-languageclient\build\lib\languageclient.js:131:10) at TextEditorSyncAdapter.sendFullChanges (C:\Users\user\.atom\packages\ide-php\node_modules\atom-languageclient\build\lib\adapters\document-sync-adapter.js:181:22) at Function.module.exports.Emitter.simpleDispatch (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:25:20) at Emitter.module.exports.Emitter.emit (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:141:34) at C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\text-editor.js:626:38 at Function.module.exports.Emitter.simpleDispatch (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:25:20) at Emitter.module.exports.Emitter.emit (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\event-kit\lib\emitter.js:141:34) at DisplayLayer.emitDidChangeSyncEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\display-layer.js:825:24) at C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:780:35 at Map.forEach (native) at TextBuffer.module.exports.TextBuffer.emitDidChangeEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:779:47) at TextBuffer.module.exports.TextBuffer.applyChange (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:762:18) at TextBuffer.module.exports.TextBuffer.setTextInRange (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:697:29) at C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:677:32 at TextBuffer.module.exports.TextBuffer.transact (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:952:24) at TextBuffer.module.exports.TextBuffer.setTextInRange (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:675:27) at TextBuffer.module.exports.TextBuffer.delete (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\text-buffer\lib\text-buffer.js:785:25) at DocBlockrAtom.module.exports.DocBlockrAtom.erase (C:\Users\user\.atom\packages\docblockr\lib\docblockr-worker.js:799:20) at DocBlockrAtom.module.exports.DocBlockrAtom.parse_command (C:\Users\user\.atom\packages\docblockr\lib\docblockr-worker.js:287:12) at HTMLElement.<anonymous> (C:\Users\user\.atom\packages\docblockr\lib\docblockr-worker.js:81:16) at CommandRegistry.handleCommandEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\command-registry.js:381:36) at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:621:22) at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:412:28) at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\window-event-handler.js:100:42) at HTMLDocument.<anonymous> (C:\Users\user\AppData\Local\atom\app-1.21.2\resources\app\src\window-event-handler.js:3:65)

So, reenable plugin is an temporary workaround.

@developer-lindner
Copy link

reenable plugin doesn't helps...

@umpirsky
Copy link

umpirsky commented Nov 9, 2017

Happens still in Atom 1.22.

@developer-lindner
Copy link

developer-lindner commented Nov 10, 2017

Stack Trace on Mac OS X:

Error: Connection is closed.
at new ConnectionError (/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:138:28)
at throwIfClosedOrDisposed (/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:613:19)
at Object.sendNotification (/.atom/packages/ide-php/node_modules/vscode-jsonrpc/lib/main.js:667:13)
at LanguageClientConnection._sendNotification (/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/languageclient.js:242:15)
at LanguageClientConnection.didChangeTextDocument (/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/languageclient.js:131:10)
at TextEditorSyncAdapter.sendFullChanges (/.atom/packages/ide-php/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:181: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:641:38
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 DisplayLayer.emitDidChangeSyncEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:825:24)
at decorationLayerDisposable.textDecorationLayer.onDidInvalidateRange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:161:20)
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 TokenizedBuffer.tokenizeNextChunk (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:411:26)
at _.defer (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:378:63)
at /Applications/Atom.app/Contents/Resources/app/node_modules/underscore/underscore.js:666:53

@rsese
Copy link

rsese commented Nov 14, 2017

Does anyone have a public project they can share with steps to reproduce the error using that project?

@martinbean
Copy link
Author

@rsese Try it with any PHP project, because it’s unusable in Atom for me across three different Macs, so much so that I quickly stopped using the “IDE” features.

@rsese
Copy link

rsese commented Nov 16, 2017

Yes I've tried with simple test files and also with random projects like https://github.com/borisrepl/boris but can't reproduce this error. As Damien mentioned in atom/ide-typescript#17 (comment), getting a reproduction would be helpful for us.

@vash1486
Copy link

Don't know if is related, but I had similar problems after setting "Memory Limit" to 1GB in ide-php's settings. Removing this customization the problem solved, but, obviously, with large projects (opening more than one) my ram saturates and the pc collapses :(

@umpirsky
Copy link

@vash1486 Yes, in my experience it is related.

@martinbean
Copy link
Author

martinbean commented Dec 15, 2017

I gave up with this issue, and Atom in general. Started using Visual Studio Code with the Intelephense package and it’s snappy and has more IDE-features than even this package would have added to Atom for PHP development.

@umpirsky
Copy link

#73 looks related.

@mikebronner
Copy link

mikebronner commented Jan 10, 2018

**Sidenote: ** While I haven't switched to VSCode because of missing use statement auto-insertion on auto-complete, I have found intelephense to be far better as well. I did inquire early on if atom-php would consider switching auto-complete providers, but it seems that atom-php and the current autocomplete provider are a package deal. They would only consider switching if the felixbecker package didn't work out.

@martinbean That being said, it might not be that difficult to make an Atom port of intelephense. (I find Atom's UI better than VSCode, personal preference, so I will probably be sticking with Atom for now.)

@martinbean
Copy link
Author

martinbean commented Jan 10, 2018

@mikebronner I was a longtime user of Atom. Had used it as my primary development environment since private beta. But been using VS Code in anger for a couple of months now and already feel comfortable with it.

It’s a shame. I did (and still do) like Atom, but it seems to be suited for working with “first-class” supported languages like JavaScript, and PHP support and compatibility just feels like an afterthought because PHP’s not a “cool kid” language.

If the ide-php package ever becomes stable, then I’ll give it another try, but I write PHP as my day job and need an editor that makes it easy for me, not one that I have to fight with.

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

No branches or pull requests

8 participants