-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
cider-connect fails on first try #671
Comments
I'll need some reliable steps to reproduce this so I can debug and fix it. Tried a few projects, all seem to work ok. |
I see this fairly regularly as well but cannot reproduce reliably. General steps:
In the
An empty
Running Off the top of my head I would guess it has something to do with a timeout waiting for the lein process. |
+1, although adding the following lines to my (otherwise empty) company-mode config made the issue disappear completely: (setq company-idle-delay 0.5) (courtesy of bbatsov) I was using the following empty project (/w cider-nrepl 0.7.0): (ns embnrepl.core (defn -main Without having these line, I could reproduce the issue the issue in two ways:
Or if I keep Emacs running, and restart the nrepl server it still works. |
@dgutov Any ideas which of company's defaults might be causing this (I'm guessing the idle delay)? I guess the problem is that it tries to fetch completions before cider has finished connecting to the nREPL server. |
Most likely. The other options don't seem relevant. I don't think raising its value would be a good solution, though: the nrepl server might take even more time to start on slower machines. |
Is there a some lazy initialisation step in starting nrepl-server or 2014-08-11 11:38 GMT+01:00 Dmitry Gutov [email protected]:
László Török |
Although, why would it try to fetch completions? |
No idea. I was pretty surprised when @laczoka suggested that company was causing this particular problem (although I'm still not convinced this is the case). |
If the command works asynchronously (or if there's some asynchronous element to its completion after the function returns), maybe the user starts typing something, then |
I've added a simple connection check to the completion-at-point function. Let's see if this will solve the problem. |
Hi, just wanted to add, the I'm unconvinced myself! It looks like a sporadic 2014-08-11 12:38 GMT+01:00 Bozhidar Batsov [email protected]:
László Török |
I've seen this issue too, and I'm using |
I've played with this a bit more, I am almost certain now, that the company I can't really tell since, not exactly sure, what the error message means Pointers are welcome :) 2014-08-11 19:56 GMT+01:00 Jeff Valk [email protected]:
László Török |
I haven't had a chance to try debug this myself but try |
@Vitoshka suggested that this might be a sync timeout issue. This seems unlikely (as I cannot reproduce the problem even with a tiny timeout value), but I've added an error message for timeouts anyways. Please update and let me know if you see any timeout errors on jack-in/connect. |
@bbatsov well that was a good idea!
Let me know if I can provide further details. |
@julienfantin, could you reproduce with a bigger value of |
@Vitoshka hmmm I've only tried a few times so far, but it has worked every time since I increased it to 30! This seems good, but I'll report back. |
Sorry but this isn't fixed for me in the latest version. Ive customized |
What's the error message? On Wednesday, August 20, 2014, Julien Fantin [email protected]
Best Regards, |
|
+1 I just updated cider this morning (2014-08-20) and got this error:
|
Yeah, I imagined this would still be problematic, but there was not way to fix until nREPL 0.2.4 was out (which happened today). I'll release a new update shortly. |
Excellent! I was wondering if nREPL 0.2.4 fixed it, but nothing in the changelog jumped out at me. What is the fix? |
The java version is now supplied in the describe session op's response (alongside the nrepl and clojure versions). The REPL gets created in describe session's callback, but as there was no Java version I either had to remove it from the banner or retrieve it synchronously (which is causing this problem). Oddly enough, I've never been able to reproduce this, but I'll be able to fix it. :-) |
Happy to report it's been working flawlessly since the nREPL update 👍 |
I am getting this error again: Starting nREPL server via lein repl :headless... |
Issue was caused by nrepl-middleware being added. Add the following to the leiningen profiles.clj to reproduce: |
@agarman Yes, that's what did it to me too. Did you find a solution? |
@neverfox I didn't; I stopped using that middleware. |
@agarman Same. Instead I just inject |
I have a similar problem, but instead I get
the first time from Emacs. The second time I succeed (I have get some zoombie java-processes I need to kill). Messages looks like this:
|
error in process filter: nrepl-send-sync-request: Sync nREPL request timed out (op eval code |
I've had this issue for a while, where the first
cider-connect
invocation always hangs for a while and eventually errors witherror in process filter: Quit
, but the next invocation goes through.The text was updated successfully, but these errors were encountered: