Fork me on GitHub
#figwheel-main
<
2023-05-10
>
reefersleep11:05:15

I'm currently stuck with figwheel - not figwheel-main - at my work project, and I'm having an issue running the REPL. I asked in #figwheel a week ago and got no replies. So, I'm sorry if it's off-topic to ask here, but I'm unsure of where else to ask. When I run lein figwheel my-profile int he terminal, I get the following error (part of a long, long stacktrace):

Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/k4/6_gfzwc524xfk3r_blf6qqm80000gn/T/jna5990386747980808100.tmp: dlopen(/private/var/folders/k4/6_gfzwc524xfk3r_blf6qqm80000gn/T/jna5990386747980808100.tmp, 0x0001): tried: '/private/var/folders/k4/6_gfzwc524xfk3r_blf6qqm80000gn/T/jna5990386747980808100.tmp' (fat file, but missing compatible architecture (have (unknown,i386,x86_64), need (arm64e)))
I assume it's to do with a version mismatch of Java and my M1 Mac - the process is running a non-M1 version (unknown,i386,x86_64) and needs a M1-compatible version (arm64e). Thing is, I've only installed openjdk20 of the latter kind:
% file $(brew --prefix openjdk)/bin/java     
/opt/homebrew/opt/openjdk/bin/java: Mach-O 64-bit executable arm64
So I'm a bit stuck. I'm even unsure how to figure out where exactly a wrong version is referenced.

reefersleep11:05:46

Ahhhh... Is it because the old figwheel still uses the Hawk watcher? I saw a thread where @seancorfield noted that this was a problem with M1 macs in figwheel-main.

👍 2
reefersleep12:05:18

Looks like it! Adding

figwheel {:hawk-options    {:watcher :polling}
to the project.clj seems to fix the problem. But it's already working for my coworkers who are on M1 machines. I wonder if they've somehow installed X86 versions of Java and are running those when doing lein figwheel my-profile. I'll have to ask them. Thanks for rubber ducking, everyone 😅

mikerod00:05:13

Yeah. Sounds about right. I’d recommend trying to move to figwheel-main. I did it for a bunch of projects at one point and don’t think it was too much trouble.

👌 2