ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.43k stars 2.81k forks source link

java completer stuck at 100%, never loads #3219

Closed ghost closed 5 years ago

ghost commented 5 years ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Issue Details

Provide a clear description of the problem, including the following key questions:

Just opening vim a lot to edit java files. Also was experimenting today with UltiSnips.

YouCompleteMe helps me write java (it happened at the start)

halfway through today the java completer gets stuck at

Initializing Java completer: 100% Starting Java Language Server - Resolve plugin dependency

Diagnostic data

Output of vim --version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct 29 2018 06:55:58)
macOS version
Included patches: 1-500
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl               +extra_search      +mouse_netterm     +tag_old_static
+arabic            +farsi             +mouse_sgr         -tag_any_white
+autocmd           +file_in_path      -mouse_sysmouse    -tcl
+autochdir         +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    -gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl              +vartabs
+clipboard         +jumplist          +persistent_undo   +vertsplit
+cmdline_compl     +keymap            +postscript        +virtualedit
+cmdline_hist      +lambda            +printer           +visual
+cmdline_info      +langmap           +profile           +visualextra
+comments          +libcall           -python            +viminfo
+conceal           +linebreak         +python3           +vreplace
+cryptv            +lispindent        +quickfix          +wildignore
+cscope            +listcmds          +reltime           +wildmenu
+cursorbind        +localmap          +rightleft         +windows
+cursorshape       -lua               +ruby              +writebackup
+dialog_con        +menu              +scrollbind        -X11
+diff              +mksession         +signs             -xfontset
+digraphs          +modify_fname      +smartindent       -xim
-dnd               +mouse             +startuptime       -xpm
-ebcdic            -mouseshape        +statusline        -xsmp
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_clipboard
+eval              -mouse_gpm         +syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary        
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X -DMACOS_X_DARWIN  -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: clang   -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib  -L/usr/local/lib -o vim        -lncurses -liconv -framework AppKit   -mmacosx-version-min=10.14 -fstack-protector-strong -L/usr/local/lib  -L/usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc  -L/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin -lpython3.7m -framework CoreFoundation  -lruby.2.5.3 -lobjc    

Output of YcmDebugInfo

Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/06/86nmfyvd3x9g2xzgts5xsfgc0000gn/T/ycm_zq_qs8u0
.log
-- Server Python interpreter: /usr/local/opt/python@2/bin/python2.7
-- Server Python version: 2.7.15
-- Server has Clang support compiled in: False
-- Clang version: None
-- No extra configuration file found
-- Server running at: http://127.0.0.1:50278
-- Server process ID: 79400
-- Server logfiles:
--   /var/folders/06/86nmfyvd3x9g2xzgts5xsfgc0000gn/T/ycmd_50278_stdout_udus5sbv
.log
--   /var/folders/06/86nmfyvd3x9g2xzgts5xsfgc0000gn/T/ycmd_50278_stderr_eq3x02y3
.log

Contents of YCM, ycmd and completion engine logfiles

https://gist.github.com/theonlygusti/02486525d638774b768103f0a84f2e76

OS version, distribution, etc.

macOS 10.14 Mojave

Output of build/install commands

Include link to a gist containing the invocation and entire output of install.py if reporting an installation issue.

bstaletic commented 5 years ago

I don't think we can do anything about this - YCM never received "I'm ready" message from the jdt.ls server. I know that this isn't reproducible easily, but that's exactly what we need to even attempt to see what's going on.

puremourning commented 5 years ago

Where are the log files?

puremourning commented 5 years ago

Please include debug info when in a file that is experiencing the problem

ghost commented 5 years ago

@puremourning I just added the gist of log files https://gist.github.com/theonlygusti/02486525d638774b768103f0a84f2e76

micbou commented 5 years ago

We need a SSCCE. See also CONTRIBUTING.md.

puremourning commented 5 years ago

the java completer is working correctly. you can ignore the status that says 100% complete.

For anyone who cares, the jdt.ls now sends its Started message before it's "Starting 100%" message since some recent version. this confuses makes ycmd report the wrong status text, but insternally, everything works fine.

2018-11-07 09:45:02,516 - DEBUG - RX: Received message: b'{"jsonrpc":"2.0","method":"language/status","params":{"type":"Started","message":"Ready"}}'
2018-11-07 09:45:02,516 - INFO - jdt.ls initialized successfully.
2018-11-07 09:45:02,556 - INFO - Server reported: 07-Nov-2018 09:45:02 Workspace initialized in 1984ms
2018-11-07 09:45:02,580 - DEBUG - RX: Received message: b'{"jsonrpc":"2.0","method":"language/status","params":{"type":"Starting","message":"100% Starting Java Language Server - Resolve plugin dependency"}}'

I have a patch (https://github.com/Valloric/ycmd/pull/1174) which fixes this (purely cosmetic) issue. If you're having other issues with java support please raise a new issue.