grammarly: Error: Unknown Scheme - Grammarly Extension Failing to Start in VSCode
Discussed in https://github.com/znck/grammarly/discussions/385
<div type='discussions-op-text'>Originally posted by KedneckInc September 8, 2023 Environment:
- Windows: 11.?
- Visual Studio Code: 1.82.0
What has been tried:
- Latest PreRelease,
- Latest Released,
- Released Version 0.20.0.
The crazy thing is it was working just a day or three ago! I’m afraid I didn’t note which version it was running at that time.
The attempt to start the language server gives results like this. This sample is from 0.20.0:
`Ready!
Initialized!
open file:///c%3A/msys64/REDACTED.md
create text checking session for "file:///c%3A/msys64/REDACTED.md" with {
"documentDialect": "auto-text",
"documentDomain": "creative",
"suggestions": {
"ConjunctionAtStartOfSentence": false,
"Fluency": true,
"InformalPronounsAcademic": false,
"MissingSpaces": true,
"NounStrings": true,
"NumbersBeginningSentences": true,
"NumbersZeroThroughTen": true,
"OxfordComma": true,
"PassiveVoice": false,
"PersonFirstLanguage": false,
"PossiblyBiasedLanguageAgeRelated": false,
"PossiblyBiasedLanguageDisabilityRelated": false,
"PossiblyBiasedLanguageFamilyRelated": false,
"PossiblyBiasedLanguageGenderRelated": false,
"PossiblyBiasedLanguageHumanRights": false,
"PossiblyBiasedLanguageHumanRightsRelated": false,
"PossiblyBiasedLanguageLgbtqiaRelated": false,
"PossiblyBiasedLanguageRaceEthnicityRelated": false,
"PossiblyPoliticallyIncorrectLanguage": false,
"PrepositionAtTheEndOfSentence": true,
"PunctuationWithQuotation": true,
"ReadabilityFillerwords": true,
"ReadabilityTransforms": true,
"SentenceVariety": true,
"SpacesSurroundingSlash": true,
"SplitInfinitive": true,
"StylisticFragments": false,
"UnnecessaryEllipses": false,
"Variety": true,
"Vocabulary": true
}
}
node:internal/deps/undici/undici:11413
Error.captureStackTrace(err, this);
^
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11413:11) {
cause: Error: unknown scheme
at makeNetworkError (node:internal/deps/undici/undici:6768:35)
at schemeFetch (node:internal/deps/undici/undici:10875:18)
at node:internal/deps/undici/undici:10748:26
at mainFetch (node:internal/deps/undici/undici:10765:11)
at fetching (node:internal/deps/undici/undici:10722:7)
at fetch2 (node:internal/deps/undici/undici:10600:20)
at Object.fetch (node:internal/deps/undici/undici:11411:18)
at fetch (node:internal/process/pre_execution:248:25)
at c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\server\index.node.js:34:77333
at c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\server\index.node.js:34:77553 {
[cause]: undefined
}
}
Node.js v18.15.0
[Error - 12:48:50 PM] Connection to server got closed. Server will not be restarted.
[Error - 12:48:50 PM] Request textDocument/codeAction failed.
Error: Connection got disposed.
at Object.dispose (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:30:4048)
at Object.dispose (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:35:9520)
at os.handleConnectionClosed (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:37:9054)
at os.handleConnectionClosed (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:40:12095)
at r (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:37:8736)
at Zs.invoke (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:3:9583)
at Kr.fire (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:3:10348)
at Rt (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:4:10852)
at Zs.invoke (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:3:9583)
at Kr.fire (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:3:10348)
at wo.fireClose (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:3:12622)
at ChildProcess.<anonymous> (c:\Users\spind\.vscode\extensions\znck.grammarly-0.20.0\dist\extension\index.node.js:30:11847)
at ChildProcess.emit (node:events:525:35)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 28
- Comments: 16 (1 by maintainers)
Fixed today in v0.24.0
With Grammarly deprecating their public API, this issue is a good excuse to move away from Grammarly. As @yogidevendra mentioned, LanguageTool is probably the best free option. However, I found a few defunct LanguageTool VSCode extensions. This one in particular doesn’t work (for me at least) but shows up near the top of the list: https://marketplace.visualstudio.com/items?itemName=adamvoss.vscode-languagetool. It has not been updated since 2018. I do not recommend it.
I found this one, which does seem to work: https://marketplace.visualstudio.com/items?itemName=valentjn.vscode-ltex. You can find it by searching for LTEX.
Advantages:
Disadvantages:
Switching away from Grammarly isn’t a huge loss for me personally. Grammarly always tended toward “essay-ish” styles of writing, whereas I use VSCode to write fiction. I found myself ignoring a lot of Grammarly’s suggestions for this reason. At least with LanguageTool, I almost always want to fix the errors it surfaces. Even if it doesn’t catch as many errors, I end up with a more pleasant writing experience—no more ignoring a bunch of grammar errors.
I can confirm it relates to the Node.Js version packaged within VS Code. See also https://code.visualstudio.com/updates/v1_82#_electron-25-update
Rolling back to a version older than v1.82.0 works (e.g. v1.81.1).
Please fix. 😦 Rolled back VS code for now, sadly.
Confirm the rollback to VSC v1.81.1 works.
Vale is another potential replacement, although some setup is required. I use it along with the VScode extension for vale. It’s free, open source, regularly updated and powerful. What I like about it is that I can configure custom style guides for the way I write, with variations for writing in different contexts or styles. Over time, using vale, i’ve got my own personalize in-house styleguide right inside of VScode.