Result from CocInfo
Neovim 0.4.0, coc.nvim 0.0.64 (5a39b66)
Click to expand
## versions
vim version: NVIM v0.4.0-533-g052ced495
node version: v10.15.3
coc.nvim version: 0.0.64
term: xterm-256color
platform: linux
## Error messages
## Output channel: snippets
## Output channel: Python
Starting Microsoft Python language server.
## Output channel: highlight
[Info - 7:08:42 PM] Highlight server running in node v10.15.3
Describe the bug
When vim help is shown as <F1> is pressed, the following error message appears and after that every single keystroke will have this error message happening, making vim totally unusable.
Error detected while processing function coc#rpc#notify[2]..<SNR>108_notify:
line 7:
E12: Command not allowed from exrc/vimrc in current dir or tag search
Press ENTER or type command to continue
To Reproduce
Create a minimal mini.vim with:
set nocompatible
set runtimepath^=/path/to/coc.nvim
filetype plugin indent on
syntax on
set hidden
Start neovim with command: nvim -u mini.vim
Press <F1>
line 1: let chan_id = s:get_channel_id(self)
calling function coc#rpc#notify[2]..<SNR>108_notify[1]..<SNR>108_get_channel_id({'on_async_response': function('<SNR>1...s/vim/plugged/coc.nvim/bin/server.js']})
line 1: if s:is_vim
line 2: return get(g:, 'vim_node_'.a:client['name'].'_client_id', 0)
line 3: endif
line 4: return a:client['chan_id']
function coc#rpc#notify[2]..<SNR>108_notify[1]..<SNR>108_get_channel_id returning #3
continuing in function coc#rpc#notify[2]..<SNR>108_notify
line 2: if !chan_id | return | endif
line 2: return | endif
line 2: endif
line 3: try
line 4: if s:is_vim
line 5: call nvim#rpc#notify(chan_id, a:method, a:args)
line 6: else
line 7: call call('rpcnotify', [chan_id, a:method] + a:args)
Exception thrown: Vim(call):E12: Command not allowed from exrc/vimrc in current dir or tag search
Upgrade your neovim, it's bug of neovim.
Indeed this seems to be a bug of neovim. I can see similar messages from other plugins too.
Which version of neovim is required -- is there any issue from neovim you are aware of? I upgraded to NVIM v0.4.0-545-gc5e8924f4 (nightly as of 4/7) but still experiencing the same.
NVIM v0.4.0-545-gc5e8924f4 should be fine, have no idea why the issue still exists for you, maybe caused by some cached files.
I just installed the latest neovim from trunk and made sure all plugins and extensions were up-to-date and I'm also getting this exact same error.
@wodesuck Did you find any workaround to this ?
Edit Just to be clear, I installed latest version of neovim in hopes to solve this. I was already using a trunk build.
The latest as of 4/9 (NVIM v0.4.0-566-gd5fd0732e) still gives the same error. No workaround yet. I think the bug still presents -- @chemzqm can we have this reopened?
I just started encountering this same issue today, and after a quick bit of experimentation it appears that it only starts happening when the initial help page is pulled up. Calling :help with a parameter (ex. :help ^]) works as expected and does not trigger this bug.
Can confirm, error pops up in NeoVim 0.4.0-571-g21b108fe4 only when opening the main help page
I've found that turn off 'modeline' in help will avoid this problem. And I used git bisect to find that this commit may be the problem.
Here's my workaround for this bug:
" Since NVIM v0.4.0-464-g5eaa45547, commit 5eaa45547975c652e594d0d6dbe34c1316873dc7
" 'secure' is set when 'modeline' is set, which will cause a lot of commands
" cannot run in autocmd when opening help page.
augroup secure_modeline_conflict_workaround
autocmd!
autocmd FileType help setlocal nomodeline
augroup END
Fixed by catch the error, but still happens for other plugins which execute command on autocmd.
Neovim should fix it.
Thanks for providing the workaround @chemzqm and @mars90226! I've filed an issue at neovim: https://github.com/neovim/neovim/issues/9881.
Most helpful comment
I've found that turn off 'modeline' in help will avoid this problem. And I used git bisect to find that this commit may be the problem.
Here's my workaround for this bug: