Fork me on GitHub
#calva
<
2021-04-29
>
metehan00:04:58

I started to get ERROR: Unhandled REPL handler exception processing messageERROR: from a project that I was always using repl. I don't have any idea hot to solve it.

metehan00:04:44

[:app] Compiling ...
[:app] Build completed. (673 files, 27 compiled, 0 warnings, 9.28s)
ERROR: Unhandled REPL handler exception processing messageERROR:  Unhandled REPL handler exception processing message {{:op close, :session :op close, b9225df9-056e-4ed0-b6dc-1540534ea236:session} 735aa818-1496-494a-b3b6-c896c7f6d333}

java.net.SocketException: Socket closed
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at nrepl.transport$bencode$fn__5876.invoke(transport.clj:109)
	at nrepl.transport.FnTransport.send(transport.clj:28)
	at nrepl.middleware.session$close_session.invokeStatic(session.clj:257)
	at nrepl.middleware.session$close_session.invoke(session.clj:251)
	at nrepl.middleware.session$session$fn__6776.invoke(session.clj:294)
	at nrepl.middleware$wrap_conj_descriptor$fn__5960.invoke(middleware.clj:16)
	at shadow.cljs.devtools.server.nrepl$start$fn__7061.invoke(nrepl.clj:142)
	at nrepl.server$handle_STAR_.invokeStatic(server.clj:19)
	at nrepl.server$handle_STAR_.invoke(server.clj:16)
	at nrepl.server$handle$fn__6854.invoke(server.clj:36)
	at clojure.core$binding_conveyor_fn$fn__5754.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)
java.net.SocketException: Socket closed
	at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118)
	at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at nrepl.transport$bencode$fn__5876.invoke(transport.clj:109)
	at nrepl.transport.FnTransport.send(transport.clj:28)
	at nrepl.middleware.session$close_session.invokeStatic(session.clj:257)
	at nrepl.middleware.session$close_session.invoke(session.clj:251)
	at nrepl.middleware.session$session$fn__6776.invoke(session.clj:294)
	at nrepl.middleware$wrap_conj_descriptor$fn__5960.invoke(middleware.clj:16)
	at shadow.cljs.devtools.server.nrepl$start$fn__7061.invoke(nrepl.clj:142)
	at nrepl.server$handle_STAR_.invokeStatic(server.clj:19)
	at nrepl.server$handle_STAR_.invoke(server.clj:16)
	at nrepl.server$handle$fn__6854.invoke(server.clj:36)
	at clojure.core$binding_conveyor_fn$fn__5754.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)

otwieracz08:04:12

Hmm, I am not able to evaluate various protocol-backed calls in Calva with errors like:

ERROR: Unhandled REPL handler exception processing message {:op info, :ns myproj.core, :symbol user-id, :id 1818, :session 102fd1a1-a06e-440c-b02c-0dcdca3e67ab}
java.lang.ClassNotFoundException: com.sun.tools.javac.util.List

otwieracz08:04:32

Is this something well known with workaround available?

pez15:04:37

I saw something similar reported yesterday, somewhere. I don’t quite remember where… But it was not exactly the same so maybe unrelated. In any case, no, this is not something well known. Is it a Clojure or ClojureScript project?

bringe16:04:54

@slawek098 I think this may be related to one or both of these issues. Not sure. But worth looking at: https://github.com/clojure-emacs/orchard/issues/105 https://github.com/clojure-emacs/orchard/issues/103

👍 3
bringe16:04:09

I just created this issue in the Calva repo for more visibility: https://github.com/BetterThanTomorrow/calva/issues/1159

bringe16:04:48

@slawek098 I'm not sure but the fix may have been released in cider-nrepl 0.26. Can you try updating your cider-nrepl to that version and seeing if it helps? It may be related to dynapath-based functionality, and disabling that seems opt-in, so you may have to do that as well. https://github.com/clojure-emacs/orchard/issues/105#issuecomment-818674481

bringe16:04:58

I don't fully understand this all yet 😄

otwieracz16:04:07

@brandon.ringe actually I just did that and seems like it helped!

otwieracz16:04:22

Basically I cross-checked the dependencies with those used in my emacs setup.

otwieracz16:04:07

I can’t guarantee that it helped though - because I basically encountered the issue, asked here, updated the dependencies and restarted REPL in Calva to discover that it works.

otwieracz16:04:15

So it can be only the restart that resolved the issue.

bringe16:04:44

I see. I'll leave that Calva issue open for a bit and also update cider-nrepl's version in Calva

otwieracz16:04:56

Thanks!

👍 3
az22:04:24

Hi all, is there a way to have a breakpoint hit in clj when I trigger a handler from outside the repl like via postman? I find that I’m stashing requests in atoms but would be great if I could instrument and just pause and inspect the request. Thank you.

az05:04:37

Thank you @brandon.ringe I’m going to be following this.

👍 4
az22:04:04

I’m still struggling to understand if there is some type of connection to the repl and something like this outside request