Skip to content

Instantly share code, notes, and snippets.

@gs
Created November 5, 2021 20:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gs/0466a64b568dc2bb39dbba2cbfd9b0ab to your computer and use it in GitHub Desktop.
Save gs/0466a64b568dc2bb39dbba2cbfd9b0ab to your computer and use it in GitHub Desktop.
lein figwheel fails
➜ kotek lein figwheel
Figwheel: Cutting some fruit, just a sec ...
Figwheel: Validating the configuration found in project.clj
Figwheel: Configuration Valid ;)
Figwheel: Starting server at http://0.0.0.0:3449
Figwheel: Watching build - dev
Compiling build :dev to "resources/public/js/compiled/kotek.js" from ["src"]...
Successfully compiled build :dev to "resources/public/js/compiled/kotek.js" in 0.293 seconds.
clojure.lang.ExceptionInfo: Error in component :figwheel-system in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :figwheel-system, :component #figwheel_sidecar.system.FigwheelSystem{:system #object[clojure.lang.Atom 0x4269ff03 {:status :ready, :val #<SystemMap>}]}, :system #<SystemMap>}
at com.stuartsierra.component$try_action.invokeStatic(component.cljc:120)
at com.stuartsierra.component$try_action.invoke(component.cljc:117)
at com.stuartsierra.component$update_system$fn__18940.invoke(component.cljc:140)
at clojure.lang.ArraySeq.reduce(ArraySeq.java:111)
at clojure.core$reduce.invokeStatic(core.clj:6827)
at clojure.core$reduce.invoke(core.clj:6810)
at com.stuartsierra.component$update_system.invokeStatic(component.cljc:136)
at com.stuartsierra.component$update_system.doInvoke(component.cljc:130)
at clojure.lang.RestFn.invoke(RestFn.java:445)
at com.stuartsierra.component$start_system.invokeStatic(component.cljc:164)
at com.stuartsierra.component$start_system.invoke(component.cljc:156)
at com.stuartsierra.component$start_system.invokeStatic(component.cljc:162)
at com.stuartsierra.component$start_system.invoke(component.cljc:156)
at com.stuartsierra.component.SystemMap.start(component.cljc:179)
at figwheel_sidecar.system$start_figwheel_system$fn__20711.invoke(system.clj:673)
at figwheel_sidecar.system$dispatch_system_component_errors.invokeStatic(system.clj:659)
at figwheel_sidecar.system$dispatch_system_component_errors.invoke(system.clj:657)
at figwheel_sidecar.system$start_figwheel_system.invokeStatic(system.clj:673)
at figwheel_sidecar.system$start_figwheel_system.invoke(system.clj:671)
at figwheel_sidecar.system$start_figwheel_BANG__STAR_.invokeStatic(system.clj:708)
at figwheel_sidecar.system$start_figwheel_BANG__STAR_.invoke(system.clj:694)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$apply.invoke(core.clj:660)
at figwheel_sidecar.system$start_figwheel_BANG_.invokeStatic(system.clj:752)
at figwheel_sidecar.system$start_figwheel_BANG_.doInvoke(system.clj:710)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at figwheel_sidecar.repl_api$start_figwheel_from_lein.invokeStatic(repl_api.clj:151)
at figwheel_sidecar.repl_api$start_figwheel_from_lein.invoke(repl_api.clj:147)
at figwheel_sidecar.repl_api$launch_from_lein.invokeStatic(repl_api.clj:224)
at figwheel_sidecar.repl_api$launch_from_lein.invoke(repl_api.clj:216)
at user$eval20801.invokeStatic(form-init12039651447125453387.clj:1)
at user$eval20801.invoke(form-init12039651447125453387.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:7176)
at clojure.lang.Compiler.eval(Compiler.java:7166)
at clojure.lang.Compiler.load(Compiler.java:7635)
at clojure.lang.Compiler.loadFile(Compiler.java:7573)
at clojure.main$load_script.invokeStatic(main.clj:452)
at clojure.main$init_opt.invokeStatic(main.clj:454)
at clojure.main$init_opt.invoke(main.clj:454)
at clojure.main$initialize.invokeStatic(main.clj:485)
at clojure.main$null_opt.invokeStatic(main.clj:519)
at clojure.main$null_opt.invoke(main.clj:516)
at clojure.main$main.invokeStatic(main.clj:598)
at clojure.main$main.doInvoke(main.clj:561)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: Error in component autobuild-dev in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key "autobuild-dev", :component #figwheel_sidecar.components.cljs_autobuild.CLJSAutobuild{:build-config {:id "dev", :source-paths ["src"], :figwheel {:on-jsload "kotek.core/on-js-reload", :open-urls ["http://localhost:3449/index.html"], :build-id "dev"}, :watch-paths ["src"], :compile-paths ["src"], :build-options {:main kotek.core, :asset-path "js/compiled/out", :output-to "resources/public/js/compiled/kotek.js", :output-dir "resources/public/js/compiled/out", :source-map-timestamp true, :preloads [devtools.preload], :optimizations :none}, :compiler-env #object[clojure.lang.Atom 0x369b99ba {:status :ready, :val #CompilerEnv{}}]}, :figwheel-server #figwheel_sidecar.components.figwheel_server.FigwheelServer{:connection-count #object[clojure.lang.Atom 0x59d59946 {:status :ready, :val {}}], :browser-callbacks #object[clojure.lang.Atom 0x5449e498 {:status :ready, :val {}}], :ring-handler nil, :file-change-atom #object[clojure.lang.Atom 0x17833f {:status :ready, :val ()}], :compile-wait-time 10, :builds {"dev" {:id "dev", :source-paths ["src"], :figwheel {:on-jsload "kotek.core/on-js-reload", :open-urls ["http://localhost:3449/index.html"], :build-id "dev"}, :watch-paths ["src"], :compile-paths ["src"], :build-options {:main kotek.core, :asset-path "js/compiled/out", :output-to "resources/public/js/compiled/kotek.js", :output-dir "resources/public/js/compiled/out", :source-map-timestamp true, :preloads [devtools.preload], :optimizations :none}, :compiler-env #object[clojure.lang.Atom 0x369b99ba {:status :ready, :val #CompilerEnv{}}]}, "min" {:id "min", :source-paths ["src"], :watch-paths ["src"], :compile-paths ["src"], :build-options {:output-to "resources/public/js/compiled/kotek.js", :main kotek.core, :optimizations :advanced, :pretty-print false, :output-dir "resources/public/js/compiled/out"}, :compiler-env #object[clojure.lang.Atom 0x6a2b9cce {:status :ready, :val #CompilerEnv{}}]}}, :server-port 3449, :resolved-ring-handler nil, :server-ip "0.0.0.0", :cljs-build-fn #object[figwheel_sidecar.components.cljs_autobuild$color_output$fn__20382 0x1fc12764 "figwheel_sidecar.components.cljs_autobuild$color_output$fn__20382@1fc12764"], :http-server #object[clojure.lang.AFunction$1 0x4b77d20 "clojure.lang.AFunction$1@4b77d20"], :open-file-command nil, :unique-id "/Users/sfistak/Code/clojure/kotek", :log-writer #object[java.io.BufferedWriter 0x380518f2 "java.io.BufferedWriter@380518f2"], :file-md5-atom #object[clojure.lang.Atom 0xefe3ed0 {:status :ready, :val {}}], :css-dirs ["resources/public/css"], :http-server-root "public"}}, :system #<SystemMap>}
at com.stuartsierra.component$try_action.invokeStatic(component.cljc:120)
at com.stuartsierra.component$try_action.invoke(component.cljc:117)
at com.stuartsierra.component$update_system$fn__18940.invoke(component.cljc:140)
at clojure.lang.ArraySeq.reduce(ArraySeq.java:116)
at clojure.core$reduce.invokeStatic(core.clj:6827)
at clojure.core$reduce.invoke(core.clj:6810)
at com.stuartsierra.component$update_system.invokeStatic(component.cljc:136)
at com.stuartsierra.component$update_system.doInvoke(component.cljc:130)
at clojure.lang.RestFn.invoke(RestFn.java:445)
at com.stuartsierra.component$start_system.invokeStatic(component.cljc:164)
at com.stuartsierra.component$start_system.invoke(component.cljc:156)
at com.stuartsierra.component$start_system.invokeStatic(component.cljc:162)
at com.stuartsierra.component$start_system.invoke(component.cljc:156)
at com.stuartsierra.component.SystemMap.start(component.cljc:179)
at com.stuartsierra.component$eval18873$fn__18874$G__18863__18876.invoke(component.cljc:5)
at com.stuartsierra.component$eval18873$fn__18874$G__18862__18879.invoke(component.cljc:5)
at clojure.lang.Atom.swap(Atom.java:37)
at clojure.core$swap_BANG_.invokeStatic(core.clj:2352)
at clojure.core$swap_BANG_.invoke(core.clj:2345)
at figwheel_sidecar.system.FigwheelSystem.start(system.clj:124)
at com.stuartsierra.component$eval18873$fn__18874$G__18863__18876.invoke(component.cljc:5)
at com.stuartsierra.component$eval18873$fn__18874$G__18862__18879.invoke(component.cljc:5)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:660)
at com.stuartsierra.component$try_action.invokeStatic(component.cljc:118)
... 48 more
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/d8/cnzmzmvj13s1x99mdmw71zbw0000gn/T/jna14228429886986835435.tmp: dlopen(/private/var/folders/d8/cnzmzmvj13s1x99mdmw71zbw0000gn/T/jna14228429886986835435.tmp, 1): no suitable image found. Did find:
/private/var/folders/d8/cnzmzmvj13s1x99mdmw71zbw0000gn/T/jna14228429886986835435.tmp: no matching architecture in universal wrapper
/private/var/folders/d8/cnzmzmvj13s1x99mdmw71zbw0000gn/T/jna14228429886986835435.tmp: no matching architecture in universal wrapper
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389)
at java.base/java.lang.Runtime.load0(Runtime.java:755)
at java.base/java.lang.System.load(System.java:1953)
at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:744)
at com.sun.jna.Native.loadNativeLibrary(Native.java:678)
at com.sun.jna.Native.<clinit>(Native.java:106)
at com.barbarysoftware.jna.CarbonAPI.<clinit>(CarbonAPI.java:6)
at com.barbarysoftware.jna.CFStringRef.toCFString(CFStringRef.java:10)
at com.barbarysoftware.watchservice.MacOSXListeningWatchService.register(MacOSXListeningWatchService.java:30)
at com.barbarysoftware.watchservice.WatchableFile.register(WatchableFile.java:30)
at com.barbarysoftware.watchservice.WatchableFile.register(WatchableFile.java:39)
at hawk.watcher$fn__133.invokeStatic(watcher.clj:102)
at hawk.watcher$fn__133.invoke(watcher.clj:99)
at hawk.watcher$fn__38$G__29__47.invoke(watcher.clj:24)
at hawk.core$watch_BANG_.invokeStatic(core.clj:83)
at hawk.core$watch_BANG_.doInvoke(core.clj:59)
at clojure.lang.RestFn.invoke(RestFn.java:423)
at figwheel_sidecar.watching$watch_BANG_.invokeStatic(watching.clj:75)
at figwheel_sidecar.watching$watch_BANG_.invoke(watching.clj:41)
at figwheel_sidecar.components.cljs_autobuild.CLJSAutobuild.start(cljs_autobuild.clj:276)
at com.stuartsierra.component$eval18873$fn__18874$G__18863__18876.invoke(component.cljc:5)
at com.stuartsierra.component$eval18873$fn__18874$G__18862__18879.invoke(component.cljc:5)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:660)
at com.stuartsierra.component$try_action.invokeStatic(component.cljc:118)
... 75 more
➜ kotek
@ekoontz
Copy link

ekoontz commented Aug 20, 2022

I was able to fix this by adding :hawk-options {:watcher :polling} to :figwheel in project.clj.

This issue is 2 years old but had that fix that worked for me: bhauman/figwheel-main#253

@esciafardini
Copy link

@ekoontz that worked for me too. What is this doing? lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment