znck/grammarly

Failed to parse URL issue

cfjedimaster opened this issue · 10 comments

The plugin (just recently) has begun failing to load with the following in the output:

TypeError: Failed to parse URL from /home/ray/.vscode-server-insiders/extensions/znck.grammarly-0.22.1/dist/server/tree-sitter.wasm
    at Object.fetch (node:internal/deps/undici/undici:11413:11) {
  [cause]: TypeError [ERR_INVALID_URL]: Invalid URL
      at new NodeError (node:internal/errors:399:5)
      at URL.onParseError (node:internal/url:566:9)
      at new URL (node:internal/url:646:5)
      at new Request (node:internal/deps/undici/undici:7002:25)
      at fetch2 (node:internal/deps/undici/undici:10554:25)
      at Object.fetch (node:internal/deps/undici/undici:11411:18)
      at fetch (node:internal/process/pre_execution:241:25)
      at /home/ray/.vscode-server-insiders/extensions/znck.grammarly-0.22.1/dist/server/index.node.js:34:77333
      at /home/ray/.vscode-server-insiders/extensions/znck.grammarly-0.22.1/dist/server/index.node.js:34:77553
      at new Promise (<anonymous>) {
    input: '/home/ray/.vscode-server-insiders/extensions/znck.grammarly-0.22.1/dist/server/tree-sitter.wasm',
    code: 'ERR_INVALID_URL'
  }
}

I started having this problem when I updated to VS Code Insiders 1.82. I downgraded to 1.81 and the error disappeared.

Thank you @luisherranz! I've been grappling with this issue and downgrading to 1.81 worked for me.

I started having this issue, the solution was to downgrade vs code to version 1.77
Download from here : (vs code version 1.77)

Please, confirm your OS, distribution, NPM version and how you installed it, and the exact VS Code version (including the patch version, that is: MAJOR.MINOR.PATCH) that still works for you with Grammarly.

I'm asking, since a friend of mine, on Mac OS, has not encountered this issue.

I've downloaded https://update.code.visualstudio.com/1.77.3/linux-x64/stable (file name: code-stable-x64-1681293081.tar.gz), and it still works for me. I have Manjaro (stable Arch Linux), x64. NPM installed NOT from Manjaro/Arch repositories, but manually (as per steps from NPM). VS Code 1.82.2 (the current for Manjaro) fails the same as for you.

Any tips on how to troubleshoot this, or narrow it down?

I'm asking, since a friend of mine, on Mac OS, has not encountered this issue.

I am having the issue on MacOS. It appeared when the VSCodium was updated to 1.82 from 1.81.
Can you clarify the version of your friend?

Oh, maybe he (that friend) switched away from VS Code...

@JonasKruckenberg Jonas, thank you for mentioning Grammarly for VS Code. What's the latest VS Code you've run it on, and was it on your Mac, please?
Take care.

Hi, I have a very similar issue after the VS Code update from 1.81 to 1.82.2. It's on Windows but a colleague has the same problem on Mac as well.

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\user\.vscode\extensions\znck.grammarly-0.22.1\dist\server\index.node.js:34:77333
      at c:\Users\user\.vscode\extensions\znck.grammarly-0.22.1\dist\server\index.node.js:34:77553 {
    [cause]: undefined
  }
}

Node.js v18.15.0
[Error - 4:36:48 PM] Connection to server got closed. Server will not be restarted.

I suspect it is caused by the switch from node 16 to node 18 (see VS Code's version info below).

Version: 1.82.2 (user setup)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:55:25.390Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045

znck commented

Fixed today in v0.24.0

Wow - thank you so much @znck!