Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal error in method "textDocument/documentSymbol" ...keeps popping up all the time #24

Closed
anentropic opened this issue Aug 12, 2020 · 12 comments · Fixed by jeapostrophe/racket-langserver#53
Labels
bug Something isn't working

Comments

@anentropic
Copy link

Environment

  • OS: MacOS
  • OS Version: 10.14.6 Mojave
  • VS Code Version: 1.47.3
  • Racket version: 7.7 3M
  • Racket Langserver checksum: 01bc4ad03e449dfbe1852a141748c3d6121a1e75
  • Magic Racket version: 0.5.6

Error message

Caught exn in request "textDocument/documentSymbol"
hash-ref: no value found for key
  key: 'file:///Users/anentropic/Documents/Dev/Personal/rkt-write-thru-hash/tests.rkt
  context...:
   /Users/anentropic/Library/Racket/7.7/pkgs/racket-langserver/text-document.rkt:242:0: document-symbol
   /Applications/Racket v7.7/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /Users/anentropic/Library/Racket/7.7/pkgs/racket-langserver/methods.rkt:26:0: process-message
   /Applications/Racket v7.7/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /Users/anentropic/Library/Racket/7.7/pkgs/racket-langserver/main.rkt:54:2: consume

[Error - 10:07:06 PM] Request textDocument/documentSymbol failed.
  Message: internal error in method "textDocument/documentSymbol"
  Code: -32603 

Additional context

I was using Magic Racket pretty happily for a while.
Now it has started popping up this error every time I type something in my current file.
I don't think there is a syntax error in the file as it runs fine outside VS Code (and even if there was I would not want this intrusive error).
I have restarted VS Code but it's still happening.


If relevant, please enclose a minimal example file which triggers the errors. If you're unable to enclose the file, please do the following instead:

  1. Enable logging in Magic Racket's settings.
  2. Restart VS Code.
  3. Open the problematic file.
  4. Trigger the error.
  5. Copy the whole log from Output > Racket Language Server into some text file and enclose it to your bug report.
@anentropic anentropic added the bug Something isn't working label Aug 12, 2020
@anentropic anentropic changed the title Keeps popping up internal error in method "textDocument/documentSymbol" ...keeps popping up all the time Aug 13, 2020
@anentropic
Copy link
Author

It's not a minimal example unfortunately, but this is the file which seems to be a problem:
https://github.com/anentropic/rkt-write-thru-hash/blob/e497eeea70221c85129c368a03a5dae04d6ae682/tests.rkt

@s0kil
Copy link

s0kil commented Aug 27, 2020

Also getting this error:

Caught exn in request "textDocument/documentSymbol"
get-lexer: '(#<procedure:scribble-lexer> . #f)
  context...:
   /home/danielsokil/.racket/7.8/pkgs/racket-langserver/text-document.rkt:242:0: document-symbol
   /home/danielsokil/.asdf/installs/racket/7.8/share/racket/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /home/danielsokil/.racket/7.8/pkgs/racket-langserver/methods.rkt:26:0: process-message
   /home/danielsokil/.asdf/installs/racket/7.8/share/racket/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /home/danielsokil/.racket/7.8/pkgs/racket-langserver/main.rkt:54:2: consume

[Error - 11:27:56 PM] Request textDocument/documentSymbol failed.
  Message: internal error in method "textDocument/documentSymbol"
  Code: -32603 

@Eugleo
Copy link
Owner

Eugleo commented Sep 17, 2020

Thanks for reporting, I'm very short on time at the moment, but I'll test it out ASAP.

@benrbray
Copy link

I'm having the same issue. I'm working through the Beautiful Racket Stacker Tutorial and even the most basic examples fail with the error above.

#! /home/ben/racket/bin/racket
#lang br/quicklang
42
[Error - 4:44:03 PM] Request textDocument/documentSymbol failed.
  Message: internal error in method "textDocument/documentSymbol"
  Code: -32603 
Caught exn in request "textDocument/documentSymbol"
get-lexer: 'before-lang-line
  context...:
   /home/ben/.racket/7.8/pkgs/racket-langserver/text-document.rkt:242:0: document-symbol
   /home/ben/racket/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /home/ben/.racket/7.8/pkgs/racket-langserver/methods.rkt:26:0: process-message
   /home/ben/racket/collects/racket/contract/private/arrow-val-first.rkt:486:18
   /home/ben/.racket/7.8/pkgs/racket-langserver/main.rkt:54:2: consume

[Error - 4:44:04 PM] Request textDocument/documentSymbol failed.
  Message: internal error in method "textDocument/documentSymbol"
  Code: -32603 

@Eugleo
Copy link
Owner

Eugleo commented Oct 1, 2020

@benrbray I think your issue might be caused by not having the #lang on the first line in the file. Of course, that’s a bug, but it should be repoerted in the langserver repo instead. I’ll look into it and report it there if my guess is confirmed.

@benrbray
Copy link

benrbray commented Oct 1, 2020

I just tested again with the first line omitted -- unfortunately I get the same error.

Thanks for making this extension! Looking forward to using it once I get past this issue.

@Eugleo
Copy link
Owner

Eugleo commented Oct 1, 2020

Thanks for checking! Then it will be some custom-lang induced error, I need to check (probably it'll still go to the langserver repo).

@silesky
Copy link

silesky commented Nov 12, 2020

@Eugleo To follow up: I get the same error as @benrbray when doing the br tutorial, regardless of what line number the lang declaration is on. I mentioned it in: jeapostrophe/racket-langserver#12.

@patrickhluo
Copy link

I get the same error every time, and I found that some predicates are not in the suggested function. Btw I tried every language, advanced student, intermidiate, beginning, every one, it just doesn't work

@battleunicorn
Copy link

I am experiencing the same issue described above. I am on windows if it helps.

@Runi-c
Copy link
Contributor

Runi-c commented Apr 16, 2021

Every issue mentioned in this thread has been fixed over at the langserver in jeapostrophe/racket-langserver#51, jeapostrophe/racket-langserver#38, & jeapostrophe/racket-langserver#53 (once it's merged)

Update your racket-langserver!

@Eugleo
Copy link
Owner

Eugleo commented Apr 16, 2021

Closing this issue. Reopen if the issue persists after updating once the PR is merged.

@Eugleo Eugleo closed this as completed Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants