When using cider-jack-in
, I expect the an nREPL server to to started up and my namespace loaded on to it.
The nREPL server is loaded up, but get connected to default user
namespace, with the following error
;; Connected to nREPL server - nrepl://localhost:51153
;; CIDER 0.21.0snapshot (package: 20190212.1312), nREPL 0.6.0
;; Clojure 1.10.0, Java 1.8.0_144
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
ERROR: Unhandled REPL handler exception processing message {:op version, :prefix-rewriting false, :debug false, :session 8461f0f5-b998-4108-a56a-19e205dada4a, :id 12}
java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'clojure.tools.nrepl.transport/Transport found for class: nrepl.transport.FnTransport
at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
at clojure.tools.nrepl.transport$eval18834$fn__18835$G__18825__18842.invoke(transport.clj:16)
at refactor_nrepl.middleware$version_reply.invokeStatic(middleware.clj:144)
at refactor_nrepl.middleware$version_reply.invoke(middleware.clj:143)
at refactor_nrepl.middleware$wrap_refactor$fn__26537.invoke(middleware.clj:214)
at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__19104.invoke(middleware.clj:22)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:18)
at nrepl.server$handle_STAR_.invoke(server.clj:15)
at nrepl.server$handle$fn__21179.invoke(server.clj:27)
at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.Fut
ureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
user>
cider-jack-in
;; CIDER 0.21.0snapshot (package: 20190212.1312), nREPL 0.6.0
;; Clojure 1.10.0, Java 1.8.0_144
Emacs 26.1
OS X 10.14 "macOS Mojave"
Additionally, this also causes issues when I use <any-ns>/
(i.e any namespace followed by /
) in any of my clojure namespace. It hangs for a while and then throws the above mentioned error on the nREPL.
input in clj file
(def test (foo/))
error:
ERROR: Unhandled REPL handler exception processing message {:op namespace-aliases, :prefix-rewriting false, :debug false, :session 8461f0f5-b998-4108-a56a-19e205dada4a, :id 26}
java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'clojure.tools.nrepl.transport/Transport found for class: nrepl.transport.FnTransport
at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:583)
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:575)
at clojure.tools.nrepl.transport$eval18834$fn__18835$G__18825__18842.invoke(transport.clj:16)
at refactor_nrepl.middleware$namespace_aliases_reply.invokeStatic(middleware.clj:181)
at refactor_nrepl.middleware$namespace_aliases_reply.invoke(middleware.clj:180)
at refactor_nrepl.middleware$wrap_refactor$fn__26537.invoke(middleware.clj:214)
at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__19104.invoke(middleware.clj:22)
at nrepl.server$handle_STAR_.invokeStatic(server.clj:18)
at nrepl.server$handle_STAR_.invoke(server.clj:15)
at nrepl.server$handle$fn__21179.invoke(server.clj:27)
at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
at clojure.lang.AFn.call(AFn.java:18)
at java
.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
apart from the error and a few seconds of wait when I type a namespace/alias followed by /
or even just /
, everything seem to be working fine.
This started happening since I upgraded my cider. This happens to me on 0.20.0
as well as the latest 20190212.1312
.
Is this somehow an issue with clj-refactor
not being compatible with latest cider versions? I guess I'll have to raise the issue there then.
Everything seems to be working fine with clj-refactor
.
All of your stack traces include this: #'clojure.tools.nrepl.transport/Transport
. Lein versions 2.8.3 and 2.9.0 are incompatible with any older versions of tools.nrepl and have switched over to nrepl/nrepl. Check your class path and deps for anything bringing in this older dependency and see if you can easily bump things to unreal 0.6.0 (if using lein 2.9.0) or nrepl 0.5.0 if using lean 2.8.3
I will try that and test it out.
Updating to nrepl seems to have fixed this issue. Thanks @dpsutton.
Most helpful comment
All of your stack traces include this:
#'clojure.tools.nrepl.transport/Transport
. Lein versions 2.8.3 and 2.9.0 are incompatible with any older versions of tools.nrepl and have switched over to nrepl/nrepl. Check your class path and deps for anything bringing in this older dependency and see if you can easily bump things to unreal 0.6.0 (if using lein 2.9.0) or nrepl 0.5.0 if using lean 2.8.3