This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-04
Channels
- # announcements (4)
- # babashka (15)
- # beginners (147)
- # bristol-clojurians (8)
- # calva (6)
- # chlorine-clover (39)
- # clj-kondo (29)
- # clojure (95)
- # clojure-australia (1)
- # clojure-berlin (1)
- # clojure-europe (24)
- # clojure-nl (3)
- # clojure-spec (185)
- # clojure-uk (98)
- # clojured (2)
- # conjure (3)
- # core-async (26)
- # datomic (11)
- # etaoin (1)
- # events (1)
- # fulcro (26)
- # graalvm (3)
- # graphql (4)
- # jobs (7)
- # jobs-discuss (1)
- # kaocha (12)
- # leiningen (21)
- # malli (2)
- # meander (2)
- # parinfer (3)
- # pathom (3)
- # pedestal (5)
- # remote-jobs (2)
- # shadow-cljs (71)
- # spacemacs (2)
- # sql (4)
- # tools-deps (22)
- # tree-sitter (1)
- # vim (2)
- # xtdb (5)
After coming back to a project, I am now systematically hitting a "Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back." on node. I tried upgrading deps (Kaocha version remained unchanged), flushing everything and reinstalling.
I expect it to be somehow my fault, any idea?
that really doesn't say anything @adam678, there are an infinite number of reasons why you might be getting that error. Follow the instructions in the kaocha-cljs README for getting debug information.
@plexus Yes, although I don't find it particularly useful in this case (maybe I should):
[TypeError: Cannot read property 'error__GT_str' of undefined
at Socket.<anonymous> ([stdin]:89:28)
at Socket.emit (events.js:315:20)
at Socket.emit (domain.js:482:12)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:267:11)
at Socket.push (_stream_readable.js:212:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
at Domain.<anonymous> ([stdin]:50:21)
at Domain.emit (events.js:315:20)
at Domain.emit (domain.js:482:12)
E]
Randomized with --seed 1747909567
ERROR in node (main.java:40)
Unexpected error executing kaocha-cljs test suite.
Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back.
{:kaocha.testable/id :node, :cljs/repl-env cljs.repl.node/repl-env, :cljs/compiler-options {:target :nodejs}}
at kaocha.type.cljs$eval6800$fn__6802$fn__6816.invoke (cljs.clj:280)
kaocha.type.cljs$queue_consumer.invokeStatic (cljs.clj:181)
kaocha.type.cljs$queue_consumer.invoke (cljs.clj:173)
kaocha.type.cljs$eval6800$fn__6802.invoke (cljs.clj:258)
...
kaocha.testable$run.invokeStatic (testable.clj:119)
kaocha.testable$run.invoke (testable.clj:110)
...
kaocha.testable$run_testable.invokeStatic (testable.clj:199)
kaocha.testable$run_testable.invoke (testable.clj:148)
kaocha.testable$run_testables.invokeStatic (testable.clj:212)
kaocha.testable$run_testables.invoke (testable.clj:202)
kaocha.api$run$fn__3072$fn__3073$fn__3074.invoke (api.clj:106)
...
kaocha.api$run$fn__3072$fn__3073.invoke (api.clj:98)
...
kaocha.api$run$fn__3072.invoke (api.clj:97)
...
kaocha.api$run.invokeStatic (api.clj:83)
kaocha.api$run.invoke (api.clj:71)
kaocha.runner$run.invokeStatic (runner.clj:129)
kaocha.runner$run.invoke (runner.clj:71)
kaocha.runner$_main_STAR_.invokeStatic (runner.clj:162)
kaocha.runner$_main_STAR_.doInvoke (runner.clj:141)
...
kaocha.runner$_main.invokeStatic (runner.clj:173)
kaocha.runner$_main.doInvoke (runner.clj:171)
...
0 tests, 1 assertions, 1 errors, 0 failures.
It seems shadow-cljs pulls in version 1.10.773
Then I am really confused. It was working before (but cannot really figure out what happened since then), the browser target still does, and going to a commit before shadow was added still results in the exact same error (CLJS being pulled directly by kaocha-cljs). Could it rather be something with node itself? Although I am fairly sure I didn't upgrade since the last time it worked.
it's hard to say... we rely on the node repl-env that ships with clojurescript to launch node. then we use that repl-env to load some kaocha code which connects back to us via a websocket, so that it can forward cljs.test messages. Something in that process is not working, and I can't tell you what it it. All we know is that we ask the node cljs-repl to boot up and evaluate some code, and then expect it to connect back to us, but somehow it doesn't.
there is a whole sequence of the things happening under the hood that we have little to no control over or insight into, I can not tell you which one of these is going wrong: - starting the node executable - loading the repl bootstrap code which hooks into node's output printing - compiling our websocket-client code - loading/running the websocket-client code into node - connecting the websocket from node to kaocha
since you're on shadow-cljs the best I can offer is upgrading to kaocha-cljs2, but prepare for a learning curve and more figuring stuff out. The bulk of the work for kaocha-cljs2 is done, but the step of actually polishing it up, documented it, and creating ready-to-use recipes has not happened. I've been completely swamped with other stuff.
All right, must be something somewhere in the env but hell knows what. I'll let you know if I happen to find a solution. Anyways, thanks for your time. Both for today and in general, for all your high quality open-source work which is so useful to the community! Times are hard and I guess you are indeed busy.