neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.43k stars 954 forks source link

Error on create buffer: TypeError: this._additionalKeywords is not iterable #1050

Closed razcore-rad closed 5 years ago

razcore-rad commented 5 years ago

Result from CocInfo

versions

vim version: NVIM v0.4.0-dev node version: v12.6.0 coc.nvim version: 0.0.73-56825890dc term: screen-256color platform: linux

Messages

Error detected while processing function startify#open_buffers[6]..223_open_buffer: line 12: E325: ATTENTION 44 lines yanked into "+ 44 lines yanked into "+

Output channel: prettier

Describe the bug

I'm using coc with SpaceVim and for a few days now I noticed autocomplete, error detection & other features wouldn't work, had now idea why, then I saw there's :CocOpenLog command which gives me this:

2019-07-31T10:33:34.344 ERROR (pid:18003) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Promise.all (index 1)
    at async Workspace.attach (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45236:9)
    at async Workspace.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:44171:9)
    at async Plugin.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:54171:13)
    at async NeovimClient.<anonymous> (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1742:21)
2019-07-31T10:33:34.350 DEBUG (pid:18003) [workspace] - buffer created 2
2019-07-31T10:33:34.350 ERROR (pid:18003) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Promise.all (index 0)
    at async Workspace.attach (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45236:9)
    at async Workspace.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:44171:9)
    at async Plugin.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:54171:13)
    at async NeovimClient.<anonymous> (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1742:21)
2019-07-31T10:33:34.351 DEBUG (pid:18003) [workspace] - buffer created 1
2019-07-31T10:33:34.351 DEBUG (pid:18003) [events] - Event: BufEnter [ 1 ]
2019-07-31T10:33:34.353 DEBUG (pid:18003) [events] - Event: BufWinEnter [ 1, 1000 ]
2019-07-31T10:33:34.455 INFO (pid:18003) [plugin] - coc 0.0.73-56825890dc initialized with node: v12.6.0
2019-07-31T10:33:36.625 DEBUG (pid:18003) [events] - Event: BufWinLeave [ 1, 1000 ]
2019-07-31T10:33:36.626 DEBUG (pid:18003) [events] - Event: BufUnload [ 1 ]
2019-07-31T10:33:36.629 DEBUG (pid:18003) [workspace] - buffer unload 1
2019-07-31T10:33:36.629 DEBUG (pid:18003) [workspace] - buffer unload 1
2019-07-31T10:33:42.061 DEBUG (pid:18003) [events] - Event: FileType [ 'cpp', 3 ]
2019-07-31T10:33:42.074 DEBUG (pid:18003) [events] - Event: BufCreate [ 3 ]
2019-07-31T10:33:42.092 DEBUG (pid:18003) [events] - Event: BufEnter [ 3 ]
2019-07-31T10:33:42.098 DEBUG (pid:18003) [events] - Event: BufWinEnter [ 3, 1000 ]
2019-07-31T10:33:42.099 DEBUG (pid:18003) [events] - Event: CursorMoved [ 3, [ 9, 1 ] ]
2019-07-31T10:33:42.123 ERROR (pid:18003) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Promise.all (index 0)
    at async Events.fire (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:37467:17)
    at async NeovimClient.<anonymous> (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1755:17)
2019-07-31T10:33:42.125 DEBUG (pid:18003) [workspace] - buffer created 3
2019-07-31T10:33:46.586 DEBUG (pid:18003) [events] - Event: BufWinLeave [ 3, 1000 ]
2019-07-31T10:33:46.586 DEBUG (pid:18003) [events] - Event: BufHidden [ 3 ]
2019-07-31T10:33:46.593 DEBUG (pid:18003) [events] - Event: BufCreate [ 4 ]
2019-07-31T10:33:46.606 DEBUG (pid:18003) [events] - Event: BufEnter [ 4 ]
2019-07-31T10:33:46.612 DEBUG (pid:18003) [events] - Event: BufWinEnter [ 4, 1000 ]
2019-07-31T10:33:46.614 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:33:46.619 ERROR (pid:18003) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Promise.all (index 0)
    at async Events.fire (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:37467:17)
    at async NeovimClient.<anonymous> (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1755:17)
2019-07-31T10:33:46.620 DEBUG (pid:18003) [workspace] - buffer created 4
2019-07-31T10:33:48.400 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 44, 1 ] ]
2019-07-31T10:33:51.992 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:33:51.998 DEBUG (pid:18003) [events] - Event: FileType [ 'leaderGuide', 5 ]
2019-07-31T10:33:52.248 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 44, 1 ] ]
2019-07-31T10:33:52.256 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:33:53.616 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:33:57.799 DEBUG (pid:18003) [events] - Event: CursorHold [ 4 ]
2019-07-31T10:35:04.620 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:35:07.798 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 131 ] ]
2019-07-31T10:35:09.959 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:35:11.601 DEBUG (pid:18003) [events] - Event: BufEnter [ 2 ]
2019-07-31T10:35:11.605 DEBUG (pid:18003) [events] - Event: CursorMoved [ 2, [ 2, 1 ] ]
2019-07-31T10:35:11.606 DEBUG (pid:18003) [events] - Event: BufWinLeave [ 2, 1001 ]
2019-07-31T10:35:11.606 DEBUG (pid:18003) [events] - Event: BufHidden [ 2 ]
2019-07-31T10:35:11.608 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:35:11.609 DEBUG (pid:18003) [events] - Event: BufEnter [ 4 ]
2019-07-31T10:35:15.667 DEBUG (pid:18003) [events] - Event: CursorHold [ 4 ]
2019-07-31T10:35:35.434 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 44, 1 ] ]
2019-07-31T10:35:36.549 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:35:36.555 DEBUG (pid:18003) [events] - Event: FileType [ 'leaderGuide', 5 ]
2019-07-31T10:35:36.582 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 44, 1 ] ]
2019-07-31T10:35:36.589 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 1 ] ]
2019-07-31T10:35:37.352 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:35:39.968 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:35:43.852 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:35:48.048 DEBUG (pid:18003) [events] - Event: CursorHold [ 4 ]
2019-07-31T10:35:48.907 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:35:50.434 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 131 ] ]
2019-07-31T10:35:52.501 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 124 ] ]
2019-07-31T10:35:52.757 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 120 ] ]
2019-07-31T10:35:52.860 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 117 ] ]
2019-07-31T10:35:53.092 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 97 ] ]
2019-07-31T10:35:53.292 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 96 ] ]
2019-07-31T10:35:53.821 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 92 ] ]
2019-07-31T10:35:54.252 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 90 ] ]
2019-07-31T10:35:54.789 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 91 ] ]
2019-07-31T10:35:54.946 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 92 ] ]
2019-07-31T10:35:55.974 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 90 ] ]
2019-07-31T10:35:56.140 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 81 ] ]
2019-07-31T10:35:57.403 DEBUG (pid:18003) [events] - Event: CursorMoved [ 4, [ 1, 81 ] ]
2019-07-31T10:35:57.410 DEBUG (pid:18003) [events] - Event: FileType [ 'leaderGuide', 5 ]
2019-07-31T10:35:58.009 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:36:02.222 DEBUG (pid:18003) [events] - Event: CursorHold [ 4 ]
2019-07-31T10:36:20.828 DEBUG (pid:18003) [events] - Event: FocusGained []
2019-07-31T10:36:22.870 DEBUG (pid:18003) [events] - Event: BufWinLeave [ 4, 1000 ]
2019-07-31T10:36:22.870 DEBUG (pid:18003) [events] - Event: BufHidden [ 4 ]
2019-07-31T10:36:22.886 DEBUG (pid:18003) [events] - Event: BufEnter [ 3 ]
2019-07-31T10:36:22.890 DEBUG (pid:18003) [events] - Event: BufWinEnter [ 3, 1000 ]
2019-07-31T10:36:22.891 DEBUG (pid:18003) [events] - Event: CursorMoved [ 3, [ 9, 1 ] ]
2019-07-31T10:36:25.389 DEBUG (pid:18003) [events] - Event: CursorMoved [ 3, [ 9, 1 ] ]
2019-07-31T10:36:25.390 DEBUG (pid:18003) [events] - Event: BufReadCmd [ 'output', 'output:///info' ]
2019-07-31T10:36:25.397 DEBUG (pid:18003) [events] - Event: FileType [ 'log', 6 ]
2019-07-31T10:36:25.402 DEBUG (pid:18003) [events] - Event: BufEnter [ 6 ]
2019-07-31T10:36:25.408 DEBUG (pid:18003) [events] - Event: BufWinEnter [ 6, 1005 ]
2019-07-31T10:36:25.409 DEBUG (pid:18003) [events] - Event: CursorMoved [ 6, [ 1, 1 ] ]
2019-07-31T10:36:25.432 ERROR (pid:18003) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Workspace.checkBuffer (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45436:13)
    at async Workspace.onCursorMoved (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45372:9)
    at async Promise.all (index 0)
    at async Events.fire (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:37467:17)
    at async NeovimClient.<anonymous> (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1755:17)

while running NVIM_COC_LOG_LEVEL=debug nvim

I have no idea why since I'm haven't set any coc-settings.json and I haven't touched any additionalKeywords related options in vim scripts either.

Reproduce the bug

Note, if you can't provide minimal vimrc that could reproduce the issue, it's most likely we can't do anything to help.

I ran the above commands. After opening a main.cpp file as test, the output of :CocOpenLog is:

2019-07-31T10:41:32.655 ERROR (pid:18633) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Promise.all (index 0)
    at async Workspace.attach (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45236:9)
    at async Workspace.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:44171:9)
    at async Plugin.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:54171:13)
    at async /home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1799:13
2019-07-31T10:41:32.756 INFO (pid:18633) [plugin] - coc 0.0.73-56825890dc initialized with node: v12.6.0
2019-07-31T10:41:49.565 ERROR (pid:18633) [workspace] - Error on create buffer: TypeError: this._additionalKeywords is not iterable
    at Document.setIskeyword (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49901:29)
    at Document.init (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:49893:14)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Workspace.onBufCreate (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:45317:27)
    at async Promise.all (index 0)
    at async Events.fire (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:37467:17)
    at async NeovimClient.<anonymous> (/home/razvan/.cache/vimfiles/repos/github.com/neoclide/coc.nvim/build/index.js:1755:17)

Screenshots (optional)

As can be seen in the image the's even errors in main.cpp but coc can't detect anything, probably the process doesn't start at all.

Thanks for the tool though, it's really awesome!

image

chemzqm commented 5 years ago

It was fixed on latest release branch.