cider

Giu 2025-02-21T07:48:06.595979Z

Cider REPL started to throw exceptions. I don't know why or how, but suddenly, when I jack-in cider in my project, it start to throw exceptions in the user namespace prior to do anything on my side, I think is related to an update to latest version, because I started to work with a new emacs config file, and downloaded a fresh cider package, but no idea what could be the issue. Exception in first reply

Giu 2025-02-21T07:48:38.295379Z

ERROR: Unhandled REPL handler exception processing message {:op info, :ns buyappclojure.hello.routes, :sym version-handler, :context (defn routes
  [system]
  [
   ["/" {:get {:handler (partial #'hello-handler system)}}]
   ["/version" {:get {:handler (partial __prefix__ system)}}]
   ]), :session 28896de4-ddf0-4296-972d-d232cf23fdb1, :id 15}
java.util.concurrent.ExecutionException: java.net.MalformedURLException
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at clojure.core$deref_future.invokeStatic(core.clj:2317)
	at clojure.core$future_call$reify__8574.deref(core.clj:7121)
	at clojure.core$deref.invokeStatic(core.clj:2337)
	at clojure.core$pmap$step__8587$fn__8591.invoke(core.clj:7172)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.RT.seq(RT.java:555)
	at clojure.core$seq__5486.invokeStatic(core.clj:139)
	at clojure.core$map$fn__5958.invoke(core.clj:2774)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.RT.seq(RT.java:555)
	at clojure.core$seq__5486.invokeStatic(core.clj:139)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__8262.invokeStatic(protocols.clj:74)
	at clojure.core.protocols$fn__8262.invoke(protocols.clj:74)
	at clojure.core.protocols$fn__8203$G__8198__8216.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6965)
	at clojure.core$into.invokeStatic(core.clj:7038)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$flag_duplicates.invokeStatic(analyzer.clj:244)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$flag_duplicates.invoke(analyzer.clj:233)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_stacktrace_data.invokeStatic(analyzer.clj:351)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_stacktrace_data.invoke(analyzer.clj:345)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_cause.invokeStatic(analyzer.clj:378)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_cause.invoke(analyzer.clj:366)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_causes$fn__5124.invoke(analyzer.clj:402)
	at clojure.core$map$fn__5950$fn__5951.invoke(core.clj:2759)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core$into.invokeStatic(core.clj:7042)
	at clojure.core$into.invoke(core.clj:7029)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_causes.invokeStatic(analyzer.clj:402)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze_causes.invoke(analyzer.clj:398)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze.invokeStatic(analyzer.clj:420)
	at cider.nrepl.inlined.deps.haystack.v0v3v3.haystack.analyzer$analyze.invoke(analyzer.clj:408)
	at clojure.lang.Var.invoke(Var.java:390)
	at cider.nrepl.middleware.util.error_handling$pp_stacktrace.invokeStatic(error_handling.clj:42)
	at cider.nrepl.middleware.util.error_handling$pp_stacktrace.invoke(error_handling.clj:37)
	at cider.nrepl.middleware.util.error_handling$base_error_response.invokeStatic(error_handling.clj:52)
	at cider.nrepl.middleware.util.error_handling$base_error_response.doInvoke(error_handling.clj:44)
	at clojure.lang.RestFn.invoke(RestFn.java:428)
	at cider.nrepl.middleware.util.error_handling$eval5708$fn__5709.invoke(error_handling.clj:127)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at cider.nrepl.middleware.util.error_handling$eval5720$fn__5721.invoke(error_handling.clj:138)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at cider.nrepl.middleware.util.error_handling$eval5724$fn__5725.invoke(error_handling.clj:141)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at $handle_info.invokeStatic(info.clj:173)
	at $handle_info.invoke(info.clj:172)
	at clojure.lang.Var.invoke(Var.java:390)
	at cider.nrepl$wrap_info$fn__5474.invoke(nrepl.clj:286)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at nrepl.middleware.completion$wrap_completion$fn__2147.invoke(completion.clj:58)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_classpath$fn__5432.invoke(nrepl.clj:194)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_slurp$fn__5416.invoke(nrepl.clj:178)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_reload$fn__5540.invoke(nrepl.clj:661)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_stacktrace$fn__5564.invoke(nrepl.clj:708)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_resource$fn__5548.invoke(nrepl.clj:682)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_clojuredocs$fn__5622.invoke(nrepl.clj:860)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_log$fn__5492.invoke(nrepl.clj:406)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_undef$fn__5596.invoke(nrepl.clj:824)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_xref$fn__5614.invoke(nrepl.clj:845)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_complete$fn__5440.invoke(nrepl.clj:200)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_apropos$fn__5424.invoke(nrepl.clj:186)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_version$fn__5606.invoke(nrepl.clj:835)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at nrepl.middleware.lookup$wrap_lookup$fn__2223.invoke(lookup.clj:52)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_trace$fn__5580.invoke(nrepl.clj:793)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at nrepl.middleware.dynamic_loader$wrap_dynamic_loader$fn__1613.invoke(dynamic_loader.clj:95)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_test$fn__5572.invoke(nrepl.clj:769)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_refresh$fn__5532.invoke(nrepl.clj:636)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at nrepl.middleware.interruptible_eval$interruptible_eval$fn__1453.invoke(interruptible_eval.clj:147)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_macroexpand$fn__5500.invoke(nrepl.clj:536)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_debug$fn__5450.invoke(nrepl.clj:220)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at cider.nrepl$wrap_enlighten$fn__5458.invoke(nrepl.clj:247)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at nrepl.middleware.session$add_stdin$fn__1569.invoke(session.clj:420)
	at nrepl.middleware$wrap_conj_descriptor$fn__1165.invoke(middleware.clj:16)
	at nrepl.middleware.load_file$wrap_load_file$fn__2179.invoke(load_file.clj:81)
	at 

oyakushev 2025-02-21T07:57:41.076549Z

Hi! Does this happen immediately after you jack-in? Does this project use Leiningen? Can you please check if this happens in any one other project too?

nikolavojicic 2025-02-24T08:28:19.482169Z

Had the same error after upgrade to the latest stable CIDER. It fails for Clojure 1.12 (previous CIDER versions worked fine with the latest Clojure), works for lower Clojure versions.

nikolavojicic 2025-02-24T11:46:16.452189Z

https://github.com/clojure-emacs/cider/issues/3775

oyakushev 2025-02-24T17:27:47.598329Z

@devgiudev @nikolavojicic Can you please check if (setq cider-injected-middleware-version "0.52.1") fixes the issue?

nikolavojicic 2025-02-24T21:04:20.725059Z

Yes. It works with that version.

🎉 1
Giu 2025-02-21T08:10:06.510329Z

1.- yes, some seconds after connect. 2.- No, uses deps (its called cli?) 3.- uhmm.. Not sure if I have other projects to test, first project i work on clojure. Can try with some empty new project.

oyakushev 2025-02-21T08:19:43.415629Z

Trying on an empty project would be helpful, thank you

Evan Bernard 2025-02-21T16:59:25.049579Z

yeah, when in doubt - strip things away until you isolate what piece might be the problem 🙂 or, if this is your first project and you’re in somewhat unfamiliar territory, start from new and add pieces until you get to your current state

Giu 2025-02-21T17:11:37.007979Z

The issue is that was working 5minutes before. But I decided to change my org file, cider was updated, and then started to fail. Project compiles and works as expected

oyakushev 2025-02-21T17:14:42.622049Z

After the initial exception, after you close it, does the error keep popping up? Does everything in the REPL work otherwise?

oyakushev 2025-02-21T17:16:45.510029Z

It would also be helpful if you did M-x customize-variable cider-injected-middleware-version and set it to 0.50.3. Please also say which JDK version you are using and which OS.

Giu 2025-02-21T17:25:19.546829Z

Will test ASAP: Java is

java --version                                                                                  
openjdk 21.0.5 2024-10-15 LTS                                                                                              
OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)                                                        
OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)         
OS is WIndows 11. Emacs 29.4 Clojure the latest

oyakushev 2025-02-21T17:31:16.371989Z

OS is WIndows 11Ah, the problem is likely there. We don't do enough Windows testing these days, so problem slip through. And just to make sure, what is your M-x cider-version?

Giu 2025-02-21T17:32:13.459199Z

CIDER 1.17.0 (Cologne)

oyakushev 2025-02-21T17:36:06.669859Z

This problem looks similar to what I fixed here https://github.com/clojure-emacs/orchard/pull/307, but there are probably still places where this is mishandled. I would ask you to revert to that 0.50.3 middleware for now, while I search for solultions.

❤️ 1
Giu 2025-02-21T17:42:07.585439Z

will try, thansk

Giu 2025-02-21T17:50:45.704119Z

Seems like M-x customize-variable cider-injected-middleware-version worked for now

❤️ 1