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

Incoming message parse error: result = null #1559

Closed
maksbotan opened this issue Mar 12, 2021 · 2 comments
Closed

Incoming message parse error: result = null #1559

maksbotan opened this issue Mar 12, 2021 · 2 comments

Comments

@maksbotan
Copy link
Contributor

Your environment

Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools:

haskell-language-server version: 1.0.0.0 (GHC: 8.8.4) (PATH: /Users/maksbotan/.local/bin/haskell-language-server-8.8.4) (GIT hash: 4cd1cf934638881e52b3eba9f70157a4b799c0e9)
Tool versions found on the $PATH
cabal:		3.4.0.0
stack:		2.5.1
ghc:		8.8.4

Which lsp-client do you use:

vim version: NVIM v0.4.4
node version: v14.15.0
coc.nvim version: 0.0.80-6e5a2aaeb5
coc.nvim directory: /Users/maksbotan/.local/share/nvim/plugged/coc.nvim
term: xterm-kitty
platform: darwin

Describe your project (alternative: link to the project):
Private project with cabal-install in nix-shell.
Contents of hie.yaml:

cradle:
  cabal:
    - path: "."
      component: "lib:XXX"

Steps to reproduce

I could not pinpoint minimal reproducing example, but will be happy to have some pointers to it.

Expected behaviour

Everything should work. It does in some projects, but fails in others.

Actual behaviour

I get this error from HLS in its log:

haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":1,"result":null} Error in $.result: parsing () failed, expected Array, but encountered Null

(detailed log below)

Include debug information

Execute in the root of your project the command haskell-language-server --debug . and paste the logs here:

Debug output:
<paste your logs here>

Paste the logs from the lsp-client, e.g. for VS Code

LSP logs:
Launching haskell-language-server exe at:/Users/maksbotan/.local/bin/haskell-language-server-8.8.4
haskell-language-server version: 1.0.0.0 (GHC: 8.8.4) (PATH: /Users/maksbotan/.local/bin/haskell-language-server-8.8.4) (GIT hash: 4cd1cf934638881e52b3eba9f70157a4b799c0e9)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLog
File = Just "/tmp/hie.log", argsThreads = 0, argsProjectGhcVersion = F
alse}
  with plugins: [PluginId "brittany",PluginId "class",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide-
code-actions",PluginId "ghcide-completions",PluginId "ghcide-hover-and-sym
bols",PluginId "ghcide-type-lenses",PluginId "haddockComments",PluginId "
hlint",PluginId "importLens",PluginId "moduleName",PluginId "ormolu",Pl
uginId "pragmas",PluginId "retrie",PluginId "splice",PluginId "stylish-h
askell",PluginId "tactic"]  in directory: /Users/maksbotan/biocad/XXX
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
Starting LSP server...
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 
Start ed LSP server in 0.00s
setInitialDynFlags cradle: Cradle {cradleRootDir = "/Users/maksbotan/biocad/lc-structure-search", cradleOpt
sProg = CradleAction: Cabal}
Output from setting up the cradle Cradle {cradleRootDir = "/Users/maksbotan/biocad/lc-structure-search", cradleOptsProg = CradleAction: Cabal}
[Error  - 12:27:36 PM] haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":1,"result":null} Error in $.result: parsing () failed, expected Array, but encountered Null
@michaelpj
Copy link
Collaborator

Duplicate: #1476

This should be benign, though. If you can work out something that corresponds to the cases that actually fail, please do open another issue! Try following the Troublehsooting section of the README.

@maksbotan
Copy link
Contributor Author

Oops, sorry for the duplicate!

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

2 participants