Youcompleteme: TypeScript completer is not working after upgrade to TypeScript 2.6.1

Created on 1 Nov 2017  路  7Comments  路  Source: ycm-core/YouCompleteMe

TypeScript version: 2.6.1
VIM version: 8.0

The completer working again after revert back to 2.5.3

npm install -g [email protected]

YcmDebugInfo:

Printing YouCompleteMe debug information...
-- Client logfile: /tmp/ycm_0iihdevm.log
-- Server Python interpreter: /usr/bin/python3
-- Server Python version: 3.6.3
-- Server has Clang support compiled in: True
-- Clang version: clang version 4.0.1-6 (tags/RELEASE_401/final)
-- Extra configuration file found and loaded
-- Extra configuration path: /usr/local/etc/vim/ycm_extra_conf.py
-- TypeScript completer debug information:
--   TSServer running
--   TSServer process ID: 22270
--   TSServer executable: /usr/local/bin/tsserver
--   TSServer logfiles:
--     /tmp/tsserver_po1o5quu.log
-- Server running at: http://127.0.0.1:60835
-- Server process ID: 22200
-- Server logfiles:
--   /tmp/ycmd_60835_stdout_xd3k57sx.log
--   /tmp/ycmd_60835_stderr_kk0eepz0.log

Error log:

2017-11-01 19:35:38,187 - INFO - Received ready request
2017-11-01 19:35:38,308 - INFO - Received event notification
2017-11-01 19:35:38,313 - INFO - Using node binary from /usr/bin/nodejs
2017-11-01 19:35:38,314 - INFO - Using TSServer from /usr/local/bin/tsserver
2017-11-01 19:35:38,316 - INFO - Received event notification
2017-11-01 19:35:38,317 - INFO - Adding buffer identifiers for file: /home/ly/1.ts
2017-11-01 19:35:38,319 - INFO - TSServer log file: /tmp/tsserver_po1o5quu.log
2017-11-01 19:35:38,325 - INFO - Enabling typescript completion
2017-11-01 19:35:39,430 - INFO - Received filetype completion available request
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 260, in _ReaderLoop
    message = self._ReadMessage()
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 293, in _ReadMessage
    key, value = utils.ToUnicode( headerline ).split( ':', 1 )
ValueError: not enough values to unpack (expected 2, got 1)

2017-11-01 19:35:49,849 - INFO - Received event notification
2017-11-01 19:35:49,850 - INFO - Adding ONE buffer identifier for file: /home/ly/1.ts
2017-11-01 19:35:50,025 - INFO - Received completion request
2017-11-01 19:35:50,181 - INFO - Received event notification
2017-11-01 19:35:50,181 - INFO - Adding ONE buffer identifier for file: /home/ly/1.ts
2017-11-01 19:35:50,185 - INFO - Received completion request
2017-11-01 19:35:51,028 - INFO - Received completion request
2017-11-01 19:35:51,707 - INFO - Received event notification
2017-11-01 19:35:51,707 - INFO - Adding buffer identifiers for file: /home/ly/1.ts
2017-11-01 19:35:51,710 - INFO - Received event notification
2017-11-01 19:35:51,711 - INFO - Adding ONE buffer identifier for file: /home/ly/1.ts
2017-11-01 19:36:00,189 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 103, in GetCompletions
    .ComputeCandidates( request_data ) )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 218, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 231, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 399, in ComputeCandidatesInner
    self._Reload( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 380, in _Reload
    'tmpfile': tmpfile.name
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 364, in _SendRequest
    return deferred.result()
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 75, in result
    raise RuntimeError( 'Response Timeout' )
RuntimeError: Response Timeout

2017-11-01 19:36:01,030 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 103, in GetCompletions
    .ComputeCandidates( request_data ) )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 218, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 231, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 399, in ComputeCandidatesInner
    self._Reload( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 380, in _Reload
    'tmpfile': tmpfile.name
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 364, in _SendRequest
    return deferred.result()
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 75, in result
    raise RuntimeError( 'Response Timeout' )
RuntimeError: Response Timeout

Traceback (most recent call last):
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 108, in wrapper
    return callback( *args, **kwargs )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 70, in wrapper
    body = callback( *args, **kwargs )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 70, in EventNotification
    event_handler )( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 460, in OnFileReadyToParse
    self._Reload( request_data )
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 380, in _Reload
    'tmpfile': tmpfile.name
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 364, in _SendRequest
    return deferred.result()
  File "/usr/local/etc/vim/plugged/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 75, in result
    raise RuntimeError( 'Response Timeout' )
RuntimeError: Response Timeout

Most helpful comment

@TommyX12 If you're in a hurry to get this solved in YCM, at least for yourself, you can go into your ycmd directory and pull the fixed ycmd revision.

All 7 comments

Some services methods (getCompletionEntryDetails and getCompletionEntrySymbols) have additional parameters. Plugins that wrap the language service must pass these parameters along to the original implementation. See #19507

This is due to tsserver outputting some warnings from npm on stdout (for instance, npm WARN 2.6 No description) when it runs the automatic type acquisition. Invalid output from tsserver should be skipped.

I feel like invalid output from npm is the tsserver stdout is a straight up tsserver bug?

I agree (and so do they), but they released 2.6.1 (as the major TS2.6 release) with this behavior and it's out in the wild. Until they release a new version, ycmd won't work.

Right now the referenced ycmd repo hasn't been updated yet, so even though this is solved in ycmd, it still isn't working in YCM.

@TommyX12 If you're in a hurry to get this solved in YCM, at least for yourself, you can go into your ycmd directory and pull the fixed ycmd revision.

You fellows are absolute lifesavers! I love you guys <3

Was this page helpful?
0 / 5 - 0 ratings