Repository navigation
Description
Following the wiki to install krell in an existing AwesomeProject, when execute the following command in CLI,
got an error.
MacBookPro:AwesomeProject $ clj -M -m krell.main -co build.edn -c -r
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Waiting for device connection on port 5001
ClojureScript 1.10.844
cljs.user=> clojure.lang.ExceptionInfo: Unexpected error during REPL initialization #:cljs.repl{:error :init-failed}
at cljs.repl$repl_STAR_.invokeStatic(repl.cljc:1220)
at cljs.repl$repl_STAR_.invoke(repl.cljc:1033)
at cljs.cli$repl_opt.invokeStatic(cli.clj:325)
at cljs.cli$repl_opt.invoke(cli.clj:312)
at cljs.cli$default_compile.invokeStatic(cli.clj:534)
at cljs.cli$default_compile.invoke(cli.clj:486)
at krell.repl$krell_compile.invokeStatic(repl.clj:236)
at krell.repl$krell_compile.invoke(repl.clj:226)
at cljs.cli$compile_opt.invokeStatic(cli.clj:542)
at cljs.cli$compile_opt.invoke(cli.clj:540)
at cljs.cli$main.invokeStatic(cli.clj:703)
at cljs.cli$main.doInvoke(cli.clj:692)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$apply.invoke(core.clj:662)
at cljs.main$_main.invokeStatic(main.clj:65)
at cljs.main$_main.doInvoke(main.clj:56)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:662)
at krell.main$_main.invokeStatic(main.clj:9)
at krell.main$main.doInvoke(main.clj:7)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.main$main_opt.invokeStatic(main.clj:514)
at clojure.main$main_opt.invoke(main.clj:510)
at clojure.main$main.invokeStatic(main.clj:664)
at clojure.main$main.doInvoke(main.clj:616)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:40)
Caused by: clojure.lang.ExceptionInfo: ReferenceError: Can't find variable: cljs {:type :js-eval-exception, :error {:status :exception, :value "ReferenceError: Can't find variable: cljs"}, :repl-env #krell.repl.KrellEnv{:options {:port 5001, :watch-dirs ["src"], :connect-timeout 30000, :eval-timeout 30000, :recompile :direct, :output-dir "target", :main AwesomeProject.core}, :file-index {#object[java.io.File 0x309ac89e "/Users/Shared/Relocated_Items/Security/eUSB/sync/reactNative/projects/AwesomeProject/src"] 1627962714805, #object[java.io.File 0x2db0dd19 "/Users/Shared/Relocated_Items/Security/eUSB/sync/reactNative/projects/AwesomeProject/src/AwesomeProject"] 1627968826799, #object[java.io.File 0x354ff4f6 "/Users/Shared/Relocated_Items/Security/eUSB/sync/reactNative/projects/AwesomeProject/src/AwesomeProject/core.cljs"] 1627968826748}, :socket #object[clojure.lang.Atom 0x36b2b6e6 {:status :ready, :val {:socket #object[java.net.Socket 0x5a9004e1 "Socket[addr=/172.30.206.244,port=49559,localport=5001]"], :in #object[java.io.BufferedReader 0x17af9f67 "java.io.BufferedReader@17af9f67"], :out #object[java.io.BufferedWriter 0x6b6d8671 "java.io.BufferedWriter@6b6d8671"]}}], :state #object[clojure.lang.Atom 0x484b187c {:status :ready, :val {:watcher #object[io.methvin.watcher.DirectoryWatcher 0x1226ba98 "io.methvin.watcher.DirectoryWatcher@1226ba98"], :done true}}]}, :form (set! cljs.core/print-namespace-maps true), :js "(cljs.core.STAR_print_namespace_maps_STAR = true)"}
at cljs.repl$evaluate_form.invokeStatic(repl.cljc:577)
at cljs.repl$evaluate_form.invoke(repl.cljc:498)
at cljs.repl$repl_STAR.invokeStatic(repl.cljc:1129)
... 31 more
Activity
tetriscode commentedon Sep 12, 2021
Any luck fixing this?
jpmonettas commentedon Sep 14, 2021
Also having this same issue, but after my repl crashes second time I run krell it works.
I also had to run krell with my ip address on linux when using a device, like this
clj -M -m krell.main -h 192.168.1.8 -co build.edn -c -rmetehan commentedon Sep 21, 2021
I also have same problem and writing my ip address didn't help
and this is react-native error output maybe it will help:
bbuccianti commentedon Oct 4, 2021
Are you sure you're following the guide?
`
Select the "SDK Platforms" tab from within the SDK Manager, then check the box next to "Show Package Details" in the bottom right corner. Look for and expand the Android 10 (Q) entry, then make sure the following items are checked:
Android SDK Platform 29
Intel x86 Atom_64 System Image or Google APIs Intel x86 Atom System Image
`
Check that!
fvkluck commentedon Jan 12, 2022
I'm getting the same error (having followed all instructions carefully). Based on the above comment, I checked the SDK version and noticed that even though I hadn't installed the Android SDK 30, it was in fact installed (Android 11.0 would show 'partially installed').
Looking further, I discovered that the Android SDK 30.0 was installed when running
npx react-native run-android. After some googling I looked at my android/build.gradle file, and there thebuildToolsVersion,compileSdkVersionandtargetSdkVersionwere all set to 30 versions.I changed them to 29 versions, and now when running
npx react-native run-androidI'm getting an explanation:WARNING:: The specified Android SDK Build Tools version (29.0.2) is ignored, as it is below the minimum supported version (30.0.2) for Android Gradle Plugin 4.2.2.According to this, 4.1.0 is the last Android Gradle Plugin version to support the SDK 29. 4.2.0 was released in March 2021, so to me it seems plausible that this is the cause of this issue.
Disclaimer: this is my first attempt at getting an app to work, and I have no experience with gradle or this ecosystem. I'm not even sure if I 'set' any of the versions in a stable manner :)
I've tried downgrading to 4.1.0 and gradle 6.5, but I haven't succeeded yet. But hopefully the information above helps someone else in analyzing the issue.
fvkluck commentedon Jan 12, 2022
I looked into it a bit more, and my best guess (but I'm in somewhat over my head here) is that this is something about react-native itself that Krel just happens to run into.
The tutorial in https://reactnative.dev/docs/environment-setup#native clearly states that you require Android SDK 29, however, when I run the command listed there
npx react-native init AwesomeProject2(AwesomeProject was already taken :)), I get the following:and if I then run
npx react-native start-android, it will decide to install Android SDK 30 (I assume, but do not have the knowledge to know for certain) because the android gradle plugin 4.2.2 only works with Android SDK 30+)fvkluck commentedon Jan 16, 2022
Ok, at least on my system it turned out to be a lot easier than expected. When I run
npx react-native init AwesomeProject(without having Android SDK 30 installed), the AwesomeProject/android/build.grade has the compileSdkVersion and the targetSdkVersion both set to 30.A workaround is to edit both to 29, and then for me everything seems to work (starting the app, autoreloading). I'll keep an eye on issues that I encounter that seem related, and I'll try to figure out how/why the versions were set to 30, but for this sunday morning I'm calling it a day :)
hadils commentedon Mar 17, 2022
I'm getting this issue running iOS. I downgraded to 5.2.0 and it went away, but so did the
krell_index.jssupport that I am relying on. Here's my details:ttchuong commentedon Mar 21, 2022
In my case, removing node_modules and re-run
npm iwill resolve this issue.mharju commentedon Sep 26, 2024
This error might be caused due to having wrong
METRO_IPintarget/closure_bootstrap.js.