I know nothing about github actions... Can you verify that the node executable is available?
Yes, it is available. But actually this is not only about gh actions. I'm having the same problem on my local machine.
metosin/sieppari runs cljs tests in github actions like this: https://github.com/metosin/sieppari/blob/develop/.github/workflows/main.yml
there haven't been too many commits to sieppari so I wouldn't say that it's heavily tested but at least it passed the last couple of times it was used 😛
more or less how I’m trying to do except instead of leiningen I’m using tools-deps
Let me prepare minimal reproducible repo
there are two problems: • clojurescript tests runner got stuck and will be killed by GH action • locally I can get exception: “Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back.”
> locally I can get exception: “Exception: clojure.lang.ExceptionInfo: Kaocha ClojureScript client failed connecting back.” This is a generic error which means something went wrong on the cljs repl side.
how can I debug this?
I found debug section in README. will give it a try
there's some info in the kaocha-cljs README about getting more debugging information, this may yield some useful information, but likely it won't. the truth is that the node repl-env provides very little help when things go wrong. e.g. if node outputs an error message before the repl is fully initialized then that just gets swallowed.
this is something:
Compile sources, elapsed time: 68.163645 msecs
[goog.require could not find: kaocha_cljs_problem.core
ReferenceError: cljs is not defined
at Socket.<anonymous> ([stdin]:89:28)
at Socket.emit (events.js:209:13)
at Socket.emit (domain.js:476:20)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:282:13)
at Socket.push (_stream_readable.js:220:10)
at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
at Domain.<anonymous> ([stdin]:50:21)
at Domain.emit (events.js:209:13)
at Domain.emit (domain.js:476:20)
it is... I would have to poke at the node repl-env implementation to even begin to get an idea of where that could be coming from
sorry, I don't have a ton of bandwidth for this right now, but I'm happy to answer questions if you want to continue to dig into it. Kaocha relies on the cljs repl abstraction, and these have turned out to be hard to troubleshoot when things go wrong, and we might have to either reconsider our approach in the future, or take ownership of these repl-env implementations (i.e. fork them) to provide better instrumentation
no worries, I will try to investigate more
[#:cljs{:compiler-options {:output-dir out, :closure-warnings {:check-types :off, :check-variables :off}, :closure-defines {kaocha.type.cljs.log_level DEBUG, kaocha.type.cljs.root_log_level DEBUG, cljs.core._STAR_target_STAR_ nodejs}, :ups-libs nil, :cache-analysis true, :closure-module-roots [], :optimizations :none, :ups-foreign-libs [], :aot-cache false, :ignore-js-module-exts [.css], :preamble [cljs/imul.js], :ups-externs nil, :opts-cache cljsc_opts.edn, :source-map true, :cache-analysis-format :transit, :target :nodejs, :emit-constants nil}}
EVAL: (require (quote kaocha.cljs.websocket-client) (quote kaocha.cljs.run))
EVAL: ((fn wait-for-websocket-client [] (if (exists? kaocha.cljs.websocket-client) (kaocha.cljs.websocket-client/connect! 57105) (js/setTimeout wait-for-websocket-client 50))))
EVAL: :require-websocket-client-done8287
:cljs/err -> {:val "WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs\n", :type :cljs/err}
WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs
:cljs/err -> {:val "TypeError: Cannot read property 'error__GT_str' of undefined\n at Socket.<anonymous> ([stdin]:89:28)\n at Socket.emit (events.js:209:13)\n at Socket.emit (domain.js:476:20)\n at addChunk (_stream_readable.js:305:12)\n at readableAddChunk (_stream_readable.js:282:13)\n at Socket.push (_stream_readable.js:220:10)\n at TCP.onStreamRead (internal/stream_base_commons.js:182:23)\n at Domain.<anonymous> ([stdin]:50:21)\n at Domain.emit (events.js:209:13)\n at Domain.emit (domain.js:476:20)\n", :type :cljs/err}
TypeError: Cannot read property 'error__GT_str' of undefined
at Socket.<anonymous> ([stdin]:89:28)
at Socket.emit (events.js:209:13)
at Socket.emit (domain.js:476:20)
at addChunk (_stream_readable.js:305:12)
at readableAddChunk (_stream_readable.js:282:13)
at Socket.push (_stream_readable.js:220:10)
at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
at Domain.<anonymous> ([stdin]:50:21)
at Domain.emit (events.js:209:13)
at Domain.emit (domain.js:476:20)
EVAL: :cljs/quit
E]
More errors)
1. Looks like client did not try to exit when :cljs/quit evaluated
2. “Cannot read property ‘error__GT_str’” this looks like main problem, but I’m not sure where does it comming fromok, I need to investigate this. @s_zharinov pointed out something similar. I wonder if it's a regression in a recent release, or if it has to do with the clojurescript version
quick investigation gives me that with clojurescript “1.10.520” :cljs/quit shuts down main process. “1.10.597" runs forever even when :cljs/quit fired
also extra warning appears in logs:
:cljs/err -> {:val "WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs\n", :type :cljs/err}
WARNING: Use of undeclared Var goog.debug.LogBuffer/CAPACITY at line 45 .cljs_node_repl/lambdaisland/glogi/console.cljs