Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COQ EXITED -1, Windows #522

Closed
Balandino opened this issue Sep 19, 2022 · 12 comments
Closed

COQ EXITED -1, Windows #522

Balandino opened this issue Sep 19, 2022 · 12 comments

Comments

@Balandino
Copy link

Hello,

Following the recent commit I am now receiving "COQ EXITED -1" when starting coq.nvim on my Windows machine.

I was recently affected by issue #521 (cannot import name 'open_unix_connection' from 'asyncio') and so downgraded coq to the previous version via packer like so:

use({ 'ms-jpq/coq_nvim', commit = '84ec5faf2aaf49819e626f64dd94f4e71cf575bc' })

After I saw that that issue was fixed I upgraded to the most recent version again. When installed I get the prompt to install dependencies, which complete successfully before informing me that I can now use COQnow to start coq. However, whenever I try to start it I receive "COQ EXITED -1" . If I downgrade to the older commit again using the above packer command and install dependencies it starts working again.

Unfortunately I'm not too sure how to go about diagnosing this issue, hence raising the issue.

Thank you for your time and effort on this plugin.

@Tetrago
Copy link

Tetrago commented Oct 10, 2022

Same issue here. COQdeps runs fine with no issues, but COQnow just prints "COQ EXITED - 1". Reverting to that commit fixed the issue. I've been having the exact same issue with the exact same symptoms for CHADtree. checkhealth doesn't flag anything.

@Taverius
Copy link

Yep, same here.

If there's a way to get a log that will help, or something? Can't find any info on that.

@Tetrago
Copy link

Tetrago commented Oct 11, 2022

The CHADtree issue was fixed with a rollback too, so at least it's some kind of collective change.

@Tetrago
Copy link

Tetrago commented Oct 22, 2022

Last working commit was definitely 84ec5fa. After that, COQnow had issues with 'open_unix_connection', which then gets fixed in 9151e5e, where it now just silently fails.

@demperor-music
Copy link

Same issue here

@MRFELIXSENIOR
Copy link

same issue

@unrealapex
Copy link

Same issue, I thought I did something wrong on my end during setup.

@DencoL
Copy link

DencoL commented Nov 26, 2022

+1

@TheLeoP
Copy link
Contributor

TheLeoP commented Nov 29, 2022

I was trying to undestand what is goin wrong, but I have reached a dead end. This is what I have until now.

  1. :COQnow runs a command similar to coq run with some additional arguments
  2. The file coq/__main__.py handles this case and starts coq as normal
  3. coq tries to open a connection using an RPC client class defined in pynvim_pp
  4. On line 236 of the file rpc.py of pynvim_pp, coq sends an RPC request for "nvim_get_api_info"
  5. The class _RPClient tries to execute the request method but fails at the last line return await fut

I have no idea about how the Python event loop works or why coq is crashing (could we even call it crashing?) on that exact line. I was using the following snippet of code to show errors on Neovim and try to "debug" where was the error.

from sys import stderr
from os import linesep
print("", "hey", sep=linesep, end="", file=stderr)

It always prints "hey" as an error on Neovim until before return await fut. I tried to aux = await fut (maybe it's the wrong syntax) and then return aux, but all the code after awating fut is never executed and coq instead just shows COQ EXITED - 1.

@ms-jpq maybe you have some insight on how all this work? I'm willing to try and solve this issue for Windows if I could understand it. Sorry for bothering you with Windows stuff.

@jgulotta
Copy link

jgulotta commented Dec 4, 2022

I traced as far as pynvim_pp/rpc.py. Near as I can tell, it's trying to wait for an RPC message before a connection is made, and waiting for the connection first seems to only get as far as where open_connection is awaited. I haven't been able to get any useful information from open_connection, so I don't know if a server elsewhere is failing to start thus making it impossible to connect, or if this is supposed to open the listening side of the connection and that's failing

@ms-jpq
Copy link
Owner

ms-jpq commented Dec 8, 2022

fixed it. sorry it took so long, busy with life

@ms-jpq ms-jpq closed this as completed Dec 8, 2022
@unrealapex
Copy link

No worries, we appreciate your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants