grammarly icon indicating copy to clipboard operation
grammarly copied to clipboard

Clicking "Grammarly: check text" for current file will cause Error "Connection Got Disposed"

Open patrick330602 opened this issue 1 year ago • 12 comments

Every time I clicked Grammarly: check text from command palette and choose current file, it will notify me an error Connection Got Disposed with the following error:

Ready!
[Error - 11:50:36 AM] Server initialization failed.
Error: Connection got disposed.
    at Object.dispose (/Users/patrickwu/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
    at Object.dispose (/Users/patrickwu/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:73:35)
    at /Users/patrickwu/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:2320:28
[Error - 11:50:36 AM] Starting client failed
Error: Connection got disposed.
    at Object.dispose (/Users/patrickwu/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
    at Object.dispose (/Users/patrickwu/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:73:35)
    at /Users/patrickwu/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:2320:28

Then it restart the server and everything went normal.

Using v0.22.1 with VS Code 1.69.2.

patrick330602 avatar Jul 21 '22 03:07 patrick330602

I'm facing the same problem.

jpadhye avatar Jul 22 '22 04:07 jpadhye

Also having this issue.

toolbasedotdev avatar Jul 31 '22 03:07 toolbasedotdev

@znck, do you have any idea what might be causing this?

mihaiconstantin avatar Oct 25 '22 18:10 mihaiconstantin

I did make a fix, it was related to idle timeout. Make sure you're using prerelease version of the extension.

PS. I'll release stable version soon.

znck avatar Oct 25 '22 19:10 znck

I believe I am using the pre-release, i.e., v0.23.11, and still experiencing the issue.

mihaiconstantin avatar Oct 25 '22 19:10 mihaiconstantin

@znck, here is a video with the error I get. Maybe it helps.

https://user-images.githubusercontent.com/20051042/197864999-ef594ab9-f82c-461f-ba13-98439087b4f0.mp4

mihaiconstantin avatar Oct 25 '22 19:10 mihaiconstantin

I get the same outcome and cannot fix it - restarting doesn't help.

Ready!
[Error - 11:49:08 AM] Server initialization failed.
Error: Connection got disposed.
    at Object.dispose (/home/fantomas/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
    at Object.dispose (/home/fantomas/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:73:35)
    at /home/fantomas/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:2320:28
[Error - 11:49:08 AM] Starting client failed
Error: Connection got disposed.
    at Object.dispose (/home/fantomas/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
    at Object.dispose (/home/fantomas/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:73:35)
    at /home/fantomas/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:2320:28

I tried both the released and the pre-release version 0.23.11.

Another video: https://youtu.be/3Jv_6pt7T2Y

Platform: Linux Kubuntu 22.04

OnkelTem avatar Jan 09 '23 08:01 OnkelTem

I am having the same issue on macOS here:

Ready!
[Error - 6:42:14 PM] Server initialization failed.
Error: Connection got disposed.
    at Object.dispose (~/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
    at Object.dispose (~/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:73:35)
    at ~/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:2320:28
[Error - 6:42:14 PM] Starting client failed
Error: Connection got disposed.
    at Object.dispose (~/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-jsonrpc/lib/common/connection.js:1044:27)
    at Object.dispose (~/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:73:35)
    at ~/.vscode/extensions/node_modules/.pnpm/[email protected]/node_modules/vscode-languageclient/lib/common/client.js:2320:28

singularitti avatar Apr 16 '23 22:04 singularitti

Having the same issue on Windows, happens if I try to use any of the extension's commands, however "just this file" option is completely inoperable.

[Error - 5:15:35 PM] Server initialization failed.
Error: Connection got disposed.
	at Object.dispose (c:\Users\qmcca\.vscode\extensions\znck.grammarly-0.22.1\dist\extension\index.node.js:30:4048)
	at Object.dispose (c:\Users\qmcca\.vscode\extensions\znck.grammarly-0.22.1\dist\extension\index.node.js:35:9520)
	at c:\Users\qmcca\.vscode\extensions\znck.grammarly-0.22.1\dist\extension\index.node.js:37:6952
[Error - 5:15:35 PM] Starting client failed
Error: Connection got disposed.
	at Object.dispose (c:\Users\qmcca\.vscode\extensions\znck.grammarly-0.22.1\dist\extension\index.node.js:30:4048)
	at Object.dispose (c:\Users\qmcca\.vscode\extensions\znck.grammarly-0.22.1\dist\extension\index.node.js:35:9520)
	at c:\Users\qmcca\.vscode\extensions\znck.grammarly-0.22.1\dist\extension\index.node.js:37:6952```

QuentinMcCarthy avatar Jun 10 '23 05:06 QuentinMcCarthy

The issue is nearing a year since it's been open. I am aware that this is an open-source effort, and I am grateful for making this extension available. Nevertheless, are there plans to fix this? Or some general tips on where in the code base to look in case one wants to submit a PR?

mihaiconstantin avatar Jun 13 '23 09:06 mihaiconstantin

Any update on this? I get this error when trying to run Grammarly on a new unsaved file without extension via the `Grammarly: Check text' command.

Extension version: znck.grammarly-0.24.0 VS Code version: 1.84.2 OS: Ubuntu 23.04

evenfrost avatar Nov 22 '23 17:11 evenfrost

I can say that this problem seems unique to unsaved files - as soon as I saved the file, the problem was resolved.

scolestock avatar Apr 04 '24 14:04 scolestock