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

cider-jack-in starts up server with error #2582

Closed
ukriish opened this issue Feb 12, 2019 · 6 comments
Closed

cider-jack-in starts up server with error #2582

ukriish opened this issue Feb 12, 2019 · 6 comments

Comments

@ukriish
Copy link

ukriish commented Feb 12, 2019

Expected behavior

When using cider-jack-in, I expect the an nREPL server to to started up and my namespace loaded on to it.

Actual behavior

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> 

Steps to reproduce the problem

  1. open a clojure project
  2. run cider-jack-in

Environment & Version information

CIDER version information

;; CIDER 0.21.0snapshot (package: 20190212.1312), nREPL 0.6.0
;; Clojure 1.10.0, Java 1.8.0_144

Emacs version

Emacs 26.1

Operating system

OS X 10.14 "macOS Mojave"

@ukriish
Copy link
Author

ukriish commented Feb 12, 2019

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)

@ukriish
Copy link
Author

ukriish commented Feb 12, 2019

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.

@ukriish
Copy link
Author

ukriish commented Feb 12, 2019

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.

@dpsutton
Copy link
Contributor

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

@ukriish
Copy link
Author

ukriish commented Feb 13, 2019

I will try that and test it out.

@ukriish
Copy link
Author

ukriish commented Feb 13, 2019

Updating to nrepl seems to have fixed this issue. Thanks @dpsutton.

@ukriish ukriish closed this as completed Feb 13, 2019
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

2 participants