question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: Connection got disposed" on save

See original GitHub issue

When I try to save a file I get the following error output:

[Error - 4:14:31 PM] Connection to server got closed. Server will not be restarted.
[Error - 4:14:31 PM] Request textDocument/formatting failed.
Error: Connection got disposed.
	at Object.dispose (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/main.js:825:25)
	at Object.dispose (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-languageclient/lib/client.js:57:35)
	at LanguageClient.handleConnectionClosed (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-languageclient/lib/client.js:1954:42)
	at LanguageClient.handleConnectionClosed (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-languageclient/lib/main.js:126:15)
	at closeHandler (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-languageclient/lib/client.js:1941:18)
	at CallbackList.invoke (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/events.js:71:39)
	at Emitter.fire (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/events.js:135:36)
	at closeHandler (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/main.js:221:26)
	at CallbackList.invoke (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/events.js:71:39)
	at Emitter.fire (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/events.js:135:36)
	at IPCMessageReader.AbstractMessageReader.fireClose (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/messageReader.js:135:27)
	at ChildProcess.<anonymous> (/Users/[redacted]/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/messageReader.js:253:61)
	at emitTwo (events.js:131:20)
	at ChildProcess.emit (events.js:214:7)
	at maybeClose (internal/child_process.js:925:16)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

The syntax highlighting works but I’m not sure if anything else does.

I’ve installed reason according to the instructions at https://reasonml.github.io/docs/en/installation. This is just yarn global add bs-platform.

Also the link in the readme of this project (in section https://github.com/reasonml-editor/vscode-reasonml#reason) is outdated, I can send a pull request to update it if you want.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
slicecommented, Sep 17, 2018

I’m still getting this error even with ocp-indent installed.

4reactions
varunpatrocommented, Feb 14, 2019

@freebroccolo Is there an update on this?

Here’s a snippet of my errors:

[Error - 7:37:57 PM] Connection to server got closed. Server will not be restarted.
[Error - 7:37:57 PM] Request textDocument/formatting failed.
Error: Connection got disposed.
	at Object.dispose (/Users/varun/.vscode/extensions/freebroccolo.reasonml-1.0.38/node_modules/vscode-jsonrpc/lib/main.js:825:25)

In your ocaml-language-server repo, you say I need ocaml version 4.02.3. Do you think that is the cause?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[VS Code] Connection got disposed. · Issue #245 - GitHub
Error : Connection got disposed. Steps to Reproduce: Go trough sign in process for live share using browser to get user code.
Read more >
Connection is disposed automatically - Stack Overflow
it seems that placing the "sqlConn" into the using statement is making it dispose automatically so when the function is running it again...
Read more >
VS Code API | Visual Studio Code Extension API
An error type that should be used to signal cancellation of an operation. This type can be used in response to a cancellation...
Read more >
[RC9.2]IDE hangs when saving a new sketch - Arduino Forum
Maybe related, maybe not Scenario; Windows 10 home A saved sketch open in ... root ERROR Error: Connection got disposed. at Object.dispose ......
Read more >
[ANN] Editor Plugin for VSCode and VIM officially released!
Type hints, jump to definition, error diagnostics, and more. ... Error: Connection got disposed. at Object.dispose ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found