language-tools: Request textDocument/codeAction failed
Volar sometimes crash when I editing vue component file. It will keep showing the error message once first crashed. Command Volar: Restart Vue server
can temporary fix it.
Platform: WSL2 Volar version: v0.31.1
API output
<--- Last few GCs --->
[478:0x4a7a260] 1637739 ms: Mark-sweep (reduce) 2043.2 (2054.9) -> 2042.8 (2055.1) MB, 1585.9 / 0.0 ms (average mu = 0.088, current mu = 0.005) allocation failure scavenge might not succeed
[478:0x4a7a260] 1639018 ms: Mark-sweep (reduce) 2043.8 (2052.1) -> 2043.5 (2053.6) MB, 1274.1 / 0.0 ms (average mu = 0.047, current mu = 0.004) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa04200 node::Abort() [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
2: 0x94e4e9 node::FatalError(char const*, char const*) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
3: 0xb7978e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
4: 0xb79b07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
5: 0xd34395 [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
6: 0xd34f1f [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
7: 0xd42fab v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
8: 0xd46b6c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
9: 0xd1524b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
10: 0x105b23f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
11: 0x1401219 [/home/user/.vscode-server/bin/899d46d82c4c95423fb7e10e68eba52050e30ba3/node]
[Info - 9:23:53 AM] Connection to server got closed. Server will restart.
[Error - 9:23:53 AM] Request textDocument/hover failed.
Error: Connection got disposed.
at Object.dispose (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:1105:27)
at Object.dispose (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/common/client.js:163:35)
at LanguageClient.handleConnectionClosed (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/common/client.js:2665:42)
at LanguageClient.handleConnectionClosed (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/node/main.js:173:15)
at closeHandler (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/common/client.js:2652:18)
at CallbackList.invoke (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at closeHandler (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:272:26)
at CallbackList.invoke (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at IPCMessageReader.fireClose (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:40:27)
at ChildProcess.<anonymous> (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/node/main.js:33:45)
at ChildProcess.emit (events.js:327:22)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
[Error - 9:23:53 AM] Request textDocument/definition failed.
Error: Connection got disposed.
at Object.dispose (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:1105:27)
at Object.dispose (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/common/client.js:163:35)
at LanguageClient.handleConnectionClosed (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/common/client.js:2665:42)
at LanguageClient.handleConnectionClosed (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/node/main.js:173:15)
at closeHandler (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-languageclient/lib/common/client.js:2652:18)
at CallbackList.invoke (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at closeHandler (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:272:26)
at CallbackList.invoke (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
at Emitter.fire (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
at IPCMessageReader.fireClose (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/messageReader.js:40:27)
at ChildProcess.<anonymous> (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/node/main.js:33:45)
at ChildProcess.emit (events.js:327:22)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
... skip ...
[Error - 9:26:56 AM] Request textDocument/completion failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
(node:1378) UnhandledPromiseRejectionWarning: Error: Unhandled method volar/getAttrNameCaseClient
at handleResponse (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:510:48)
at processMessageQueue (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:308:17)
at Immediate.<anonymous> (/home/user/.vscode-server/extensions/johnsoncodehk.volar-0.31.1/node_modules/vscode-jsonrpc/lib/common/connection.js:292:13)
at processImmediate (internal/timers.js:461:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1378) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1378) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[Error - 9:26:56 AM] Request textDocument/signatureHelp failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
[Error - 9:26:57 AM] Request textDocument/codeAction failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
[Error - 9:26:57 AM] Request textDocument/completion failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
[Error - 9:26:58 AM] Request textDocument/codeAction failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
[Error - 9:26:58 AM] Request textDocument/codeAction failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
[Error - 9:26:59 AM] Request textDocument/codeAction failed.
Message: Unhandled method volar/getAttrNameCaseClient
Code: -32601
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (6 by maintainers)
The same here
Hey folks, I know its not helpful to say “me too” but I’m encountering a similar issue when working in a monorepo. sadly restarting the language server or lower power mode does not fix it
I really don’t think “you’re using it wrong” is the answer. Vetur doesn’t do this. No other plugin I use crashes with OOM
@johnsoncodehk I’m experiencing this with this with the branch
wvffle/vue3
of funkwhale project. It’s a big project that I’m migrating to vue 3 using@vue/compat
.An older version of volar worked without issues with vscode 1.65.2 and after updating to 1.66.2, it does not anymore. Not the older volar version neither the newest one. I’m using code-server so it’s not like I can update the vscode version to 1.67.0.
When I was using vscode 1.65.2, I had 2GB of memory on my machine and it worked without a hassle in normal mode. Now (1.66.2) I added additional 2GB to my remote machine and it consumes whole 4GB in normal mode and 3GB in low power mode. Even though I have a 1GB memory left free, it still crashes.
Volar - API logs
may be too many project files in the workspace, or too many projects opened at the same time by vscode
I can not migrate the existing project environment from WSL2 to Windows (too much work), but I think the issue related to nodejs memory usage.
Reference to #862, I added the nodejs settings in my
~/.bashrc
then restart vscode. Up to now, It is still working fine without any error message popup.Default settings, nodejs is using around 2GB.
After adjust the settings, nodejs is using around 4GB