sourcegraph / javascript-typescript-langserver

JavaScript and TypeScript code intelligence through the Language Server Protocol
https://sourcegraph.com
Apache License 2.0
793 stars 72 forks source link

Error from the Language Server: Request textDocument/hover failed with message: Cannot read property ’map’ of undefined (Internal Error) [7996 times] #535

Open twlz0ne opened 5 years ago

twlz0ne commented 5 years ago

Behavior

Without option --log-level:

test-emacs-lsp-typescript-1

With option --log-level:

test-emacs-lsp-typescript-2

Steps to reproduce the behavior

  1. Download test-lsp-typescript-issue535.el to /path/to/test-lsp-typescript-issue535.el

  2. Clone https://github.com/Microsoft/TypeScriptSamples to /path/to/Microsoft/TypeScriptSamples

/path/to/emacs -nw -Q -l \
            /path/to/test-lsp-typescript-issue535.el \
            /path/to/Microsoft/TypeScriptSamples/angular2/app/todo.ts

Environment

felixfbecker commented 5 years ago

Do you have more language server logs? A stack trace maybe?

twlz0ne commented 5 years ago

@felixfbecker Once added option --tsserver-path, the issue dispeared:

test-emacs-lsp-typescript-3

Seems lsp-ui depends on option --tsserver-path, if not specified, it will keep asking. Is this the problem?

If just add --log-level=4 --tsserver-log-file=lsp-typescript.log, the log file will not be created. So I can't provide the full trace.

felixfbecker commented 5 years ago

This language server does not use tsserver, so I don't know where this is coming from