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

Parse error reported while restarting the server #927

Closed
July541 opened this issue Jul 31, 2023 · 3 comments
Closed

Parse error reported while restarting the server #927

July541 opened this issue Jul 31, 2023 · 3 comments
Labels
type: bug A bug or unintended effect

Comments

@July541
Copy link
Collaborator

July541 commented Jul 31, 2023

Open a Haskell project and then restart the server with the restart command, I got the following error:

[Info  - 10:45:08 PM] Stopping the server
[Info  - 10:45:08 PM] Starting the server
2023-07-31T14:45:08.809664Z | Error | LSP: incoming message parse error:
Error in $: parsing Language.LSP.Protocol.Message.Types.TNotificationMessage(TNotificationMessage) failed, key "params" not found
when processing
{"jsonrpc":"2.0","method":"exit"}
2023-07-31T14:45:08.809956Z | Info | Reactor thread stopped
2023-07-31T14:45:08.812236Z | Error | Got EOF
2023-07-31T14:45:08.938187Z | Info | haskell-language-server version: 2.1.0.0 (GHC: 9.6.2) (PATH: /Users/treee/Code/haskell-language-server/dist-newstyle/build/aarch64-osx/ghc-9.6.2/haskell-language-server-2.1.0.0/x/haskell-language-server/build/haskell-language-server/haskell-language-server) (GIT hash: e9cc4e07fcbb1ac4fee71b63c3da8ac70c5dda31)

Maybe related to #920.

I'm not sure if there has an alternative method instead of comparing the jsonrpc message for different client versions...

@July541 July541 added the type: bug A bug or unintended effect label Jul 31, 2023
@fendor
Copy link
Collaborator

fendor commented Jul 31, 2023

Can you retry with the options Haskell > Trace > Server set to Messages? It should contain the LSP messages that are sent from the client.

@July541
Copy link
Collaborator Author

July541 commented Jul 31, 2023

Can you retry with the options Haskell > Trace > Server set to Messages? It should contain the LSP messages that are sent from the client.

I've downgrade languageclient to 7.0.0(our original version), and can't repro #920, so #920 doesn't relate to HLS upgrade, #920 and this issue are separated.

[Info  - 11:14:17 PM] Stopping the server
[Trace - 11:14:17 PM] Sending request 'shutdown - (6)'.
2023-07-31T15:14:17.733832Z | Debug | Received shutdown message
2023-07-31T15:14:17.734044Z | Debug | Finished build session
AsyncCancelled
[Trace - 11:14:17 PM] Received response 'shutdown - (6)' in 2ms.
[Trace - 11:14:17 PM] Sending notification 'exit'.
[Info  - 11:14:17 PM] Starting the server
[Trace - 11:14:17 PM] Sending request 'initialize - (0)'.
2023-07-31T15:14:17.735521Z | Error | LSP: incoming message parse error:
Error in $: parsing Language.LSP.Protocol.Message.Types.TNotificationMessage(TNotificationMessage) failed, key "params" not found
when processing
{"jsonrpc":"2.0","method":"exit"}
2023-07-31T15:14:17.735574Z | Info | Reactor thread stopped
2023-07-31T15:14:17.738390Z | Error | Got EOF
2023-07-31T15:14:17.869328Z | Info | haskell-language-server version: 2.1.0.0 (GHC: 9.6.2) (PATH: /Users/treee/Code/haskell-language-server/dist-newstyle/build/aarch64-osx/ghc-9.6.2/haskell-language-server-2.1.0.0/x/haskell-language-server/build/haskell-language-server/haskell-language-server) (GIT hash: e9cc4e07fcbb1ac4fee71b63c3da8ac70c5dda31)

@July541
Copy link
Collaborator Author

July541 commented Aug 5, 2023

Resolved by haskell/lsp#508

@July541 July541 closed this as completed Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A bug or unintended effect
Projects
None yet
Development

No branches or pull requests

2 participants