coq_nvim icon indicating copy to clipboard operation
coq_nvim copied to clipboard

Weird error message when using Coq on Vimtex

Open ndrew222 opened this issue 1 year ago • 5 comments

I get this weird error that appears when the pop-up menu is supposed to show up. I'm not sure what I did, but it shows up a bit irregularly and only after a little bit of use.

I'm running Neovim 0.10.1 Vimtex v2.15 If there is anything else I can add to make this report more helpful, please let me know

Invalid channel: 4                                                                                                                                    
Error executing vim.schedule lua callback: Invalid channel: 4                                                                                         
stack traceback:                                                                                                                                      
        [C]: in function 'm'                                                                                                                          
        [string "<nvim>"]:30: in function <[string "<nvim>"]:29>                                                                                      
Error executing vim.schedule lua callback: CompleteDone Autocommands for "*": Vim(lua):E5108: Error executing lua Invalid channel: 4                  
stack traceback:                                                                                                                                      
        [C]: in function 'Kill_win'                                                                                                                   
        [string ":lua"]:1: in main chunk                                                                                                              
        [C]: in function 'complete'                                                                                                                   
        ...local/share/nvim/plugged/coq_nvim/lua/coq/completion.lua:22: in function <...local/share/nvim/plugged/coq_nvim/lua/coq/completion.lua:4>   
stack traceback:                                                                                                                                      
        [C]: in function 'complete'                                                                                                                   
        ...local/share/nvim/plugged/coq_nvim/lua/coq/completion.lua:22: in function <...local/share/nvim/plugged/coq_nvim/lua/coq/completion.lua:4>   
                                                                                                                                                      
Traceback (most recent call last):                                                                                                                    
  File "<frozen runpy>", line 198, in _run_module_as_main                                                                                             
  File "<frozen runpy>", line 88, in _run_code                                                                                                        
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/coq/__main__.py", line 180, in <module>                                                       
    arun(init(args.socket, ppid=args.ppid, th=th))                                                                                                    
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run                                                                                     
    return runner.run(main)                                                                                                                           
           ^^^^^^^^^^^^^^^^                                                                                                                           
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run                                                                                     
    return self._loop.run_until_complete(task)                                                                                                        
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                        
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete                                                                  
    return future.result()                                                                                                                            
           ^^^^^^^^^^^^^^^                                                                                                                            
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/coq/client.py", line 98, in init                                                              
    await gather(wrap_future(die), cont())                                                                                                            
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/coq/client.py", line 72, in cont
    async with conn(die, socket=socket, default=_default) as client:
  File "/usr/lib/python3.11/contextlib.py", line 211, in __aexit__
    await anext(self.gen)
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/nvim.py", line 288, in conn
    await wrap_future(f2)
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/nvim.py", line 273, in cont
    async with _conn() as rpc:
  File "/usr/lib/python3.11/contextlib.py", line 211, in __aexit__
    await anext(self.gen)
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/nvim.py", line 257, in _conn
    async with client(
  File "/usr/lib/python3.11/contextlib.py", line 211, in __aexit__
    await anext(self.gen)
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/_rpc.py", line 292, in client
    await conn
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/_rpc.py", line 154, in _connect
    await gather(rx(recv()), send())
  File "/home/andrew/.local/share/nvim/plugged/coq_nvim/.vars/runtime/lib/python3.11/site-packages/pynvim_pp/_rpc.py", line 141, in send
    await writer.drain()
  File "/usr/lib/python3.11/asyncio/streams.py", line 378, in drain
    await self._protocol._drain_helper()
  File "/usr/lib/python3.11/asyncio/streams.py", line 167, in _drain_helper
    raise ConnectionResetError('Connection lost')
ConnectionResetError: Connection lost
Press ENTER or type command to continue                                                                                                               

ndrew222 avatar Nov 18 '24 10:11 ndrew222

So I was using the digestif language server when I made the report, but I just tested it with texlab, and I seem to get the same issue.

ndrew222 avatar Dec 05 '24 02:12 ndrew222

Can confirm I also get those types of error messages when using coq_nvim with vimtex

LoCrealloc avatar Jan 13 '25 09:01 LoCrealloc

Hey @ms-jpq I got this same error when using vimtex coq_thirdparty: error detected while processing filetype autocommands for * When for example typing a "" which activates completion of latex commands and makes nvim crash

krillin666 avatar Mar 19 '25 17:03 krillin666

Hey @ms-jpq I got this same error when using vimtex coq_thirdparty: error detected while processing filetype autocommands for * When for example typing a "" which activates completion of latex commands and makes nvim crash

Hey @ms-jpq could you please take a look at this ? It's been impossible to write LaTeX documents because everytime I start to type some latex command like \newpage coq makes the noice plugin crash and it crashes neovim and I have to terminate the neovim process.

krillin666 avatar Apr 15 '25 15:04 krillin666

@ms-jpq I am so sorry for another ping, but I've resorted to disabling your amazing plugin while editing TeX files because of this :')

ndrew222 avatar Aug 20 '25 15:08 ndrew222