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

Request textDocument/hover failed #47

Closed
BenjaminHofstetter opened this issue Apr 11, 2022 · 5 comments
Closed

Request textDocument/hover failed #47

BenjaminHofstetter opened this issue Apr 11, 2022 · 5 comments

Comments

@BenjaminHofstetter
Copy link

I am using vscode 1.66.1 and SPARQL Notebook Extension (vscode notebook https://marketplace.visualstudio.com/items?itemName=Zazuko.sparql-notebook)

With the latest vscode version Stardog SPARQL Language Server starts to throw errors on the output console like this...

[Error - 11:33:52 PM] Request textDocument/hover failed.
  Message: Request textDocument/hover failed with message: Cannot read properties of undefined (reading 'getText')
  Code: -32603 

I don't know what changed in vscode and why this is happening now.

@anneeb
Copy link
Contributor

anneeb commented Apr 13, 2022

Hi @BenjaminHofstetter,

I can confirm I’m seeing the same errors with the SPARQL Notebook Extension and VS Code 1.66.2. However, I do not see any problems with hover messages using our SPARQL language server (github, extension) with a regular .sparql file.

I’m not extremely familiar with VS Code’s Notebook API, but I did try debugging our extension with some additional logs. It seems that the Notebook files are not triggering any TextDocuments['onDidChangeContent'] events when they are opened or edited, which is correctly happening with the regular .sparql files. Additionally, I tried debugging the extension with a new notebook extension (setup with the provided example serializer), which surfaces the same errors.

I also tried all of the above with VS Code version 1.65.2 and I didn’t see the error logs in either the released extensions or my debugging environment. It looks to me that in that version, no interactions with or changes to the Notebook contents triggered any handlers within the language server. That is, the language server features are not enabled, thus there are no errors to show.

I would recommend filing an issue with VSCode to confirm the expected behavior between a Notebook and language server.

@BenjaminHofstetter
Copy link
Author

Thank you for your efforts. I raised an issue in vscode.

@dbaeumer
Copy link

dbaeumer commented May 4, 2022

@anneeb which version of the LSP libraries are you using ?

@dbaeumer
Copy link

dbaeumer commented May 4, 2022

The reason why I am asking is that VS Code changed the language selector code in 1.66 to accommodate notebooks better which I adapted in the latest version of the LSP libraries.

@anneeb
Copy link
Contributor

anneeb commented May 4, 2022

Hi @dbaeumer, thanks for looking into this. I saw your comment in zazuko/vscode-sparql-notebook#16 (comment) about our extensions only supporting files using the file protocol.

I've opened an issue in our VS code extension repo instead for adding this support: stardog-union/stardog-vsc#88

@anneeb anneeb closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants