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.

`Request textDocument/documentSymbol failed` error when closing ruby file tab.

See original GitHub issue

Your environment

  • vscode-ruby version: 0.22.3
  • Ruby version: 2.3.7p456 (2018-03-28 revision 63024) [x86_64-darwin17]
  • Ruby version manager (if any): rbenv
  • VS Code version: Version 1.33.0-insider (1.33.0-insider) 0ac111466ec925fd5ca180ab9893f51531e419b2 2019-04-01T15:39:08.133Z
  • Operating System: OS X MOJAVE 10.14 (18A391)
  • Using language server? Ruby Solargraph 0.19.3 / Gem version 0.31.3

Expected behavior

No exception

Actual behavior

Every time tab with file that has language mode = ruby (no matter extension) is closed, this error appears in the Ruby Language Server output:

[Error - 11:34:07 AM] Request textDocument/documentSymbol failed.
  Message: [ArgumentError] wrong number of arguments (given 4, expected 0)
  Code: -32603 

These errors appear in the Log(window) output ( redacted home dir to ~. first error also appear in the Log(Extension Host)):

[2019-04-02 11:29:51.688] [renderer1] [error] Cannot read property 'then' of undefined: TypeError: Cannot read property 'then' of undefined
	at Locate.listInFile (~/.vscode-insiders/extensions/rebornix.ruby-0.22.3/out/locate/locate.js:69:29)
	at Object.provideDocumentSymbols (~/.vscode-insiders/extensions/rebornix.ruby-0.22.3/out/providers/intellisense.js:55:31)
	at define.provideDocumentSymbols.a.asPromise (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:583:398)
	at t.asPromise.Promise (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:49:430)
	at new Promise (<anonymous>)
	at Object.t.asPromise (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:49:402)
	at _.provideDocumentSymbols (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:583:369)
	at define.$provideDocumentSymbols._withAdapter.e (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:599:921)
	at B._withAdapter (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:599:159)
	at B.$provideDocumentSymbols (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:599:899)
	at d._doInvokeHandler (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:622:11)
	at d._invokeHandler (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:621:716)
	at d._receiveRequest (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:620:341)
	at d._receiveOneMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:619:141)
	at define.constructor._protocol.onMessage.e (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:617:400)
	at u.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
	at e (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:40:460)
	at u.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
	at a (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:172:467)
	at e (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:172:513)
	at u.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
	at y._receiveMessage (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:181:276)
	at define.constructor._socketDisposables.push._socketReader.onMessage.e (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:178:415)
	at u.fire (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
	at f.acceptChunk (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:175:35)
	at define.constructor._register._socket.onData.e (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:174:410)
	at Socket.t (/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:182:689)
	at Socket.emit (events.js:182:13)
	at addChunk (_stream_readable.js:279:12)
	at readableAddChunk (_stream_readable.js:264:11)
	at Socket.Readable.push (_stream_readable.js:219:10)
	at Pipe.onread (net.js:636:20)

[2019-04-02 11:40:39.816] [renderer1] [error] Tree element not found: [object Object]: Error: Tree element not found: [object Object]
    at s.getElementLocation (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:91:674)
    at s.isCollapsed (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:91:14)
    at j.isCollapsed (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:940:572)
    at B.revealMarkersForCurrentActiveEditor (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5301:237)
    at B.autoReveal (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5301:94)
    at B.onActiveEditorChanged (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5298:531)
    at B._register.e (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5297:572)
    at d.fire (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75:436)
    at setTimeout (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:71:973)


This and the next section should include screenshots, code samples, console output, etc. The more information we have to reproduce the better!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
TylerSustarecommented, Jan 6, 2021

I fixed this in my setup by disabling the built-in language server.

image

0reactions
borisbokancommented, Aug 23, 2021

Had the same problem for two hours…the solution was that I deleted the variable “final args” … don’t use the reserved words in your code “args is not blocked by the compiler !!” if you use it you will have this kind of problem.

I didn’t believe it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code - Request textDocument/definition failed
I want to code and debug my own code, not manage my ecosystem of tools and debug their problems. At least they should...
Read more >
Language Server Protocol Specification - 3.15
This document describes the 3.15.x version of the language server protocol. An implementation for node of the 3.15.x version of the protocol can...
Read more >
vscode-solargraph - Bountysource
Verifying all the paths of Ruby/Solargraph executables inside VS Code ... Error - 8:27:20 PM] Request textDocument/documentSymbol failed.
Read more >
protocol - Go Packages
MethodTextDocumentDocumentSymbol = "textDocument/documentSymbol" ... as faded out in the code action menu when // the user request a more ...
Read more >
https://raw.githubusercontent.com/emacs-lsp/lsp-mo...
"textDocument/documentSymbol") "Td" lsp-ui-doc-mode "toggle documentation popup" (featurep ... ERROR-HANDLER will be called in case the request has failed.
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