Error on Mac OS m1 native mode

2021-03-21 21:57:17,590 INFO [main] c.w.Application$ - Starting…
2021-03-21 21:57:17,750 INFO [ctor.default-dispatcher-4] a.event.slf4j.Slf4jLogger - Slf4jLogger started
2021-03-21 21:57:17,785 INFO [main] c.w.Application$ - Waves v1.2.18 Blockchain Id: W
2021-03-21 21:57:17,790 DEBUG [main] c.w.database.package$ - Open DB at /Users/userName/WAVES/data
2021-03-21 21:57:17,806 ERROR [main] c.w.actor.RootActorSystem$ - Error while initializing actor system wavesplatform
java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no leveldbjni64-1.2.18 in java.library.path: [/Users/userName/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], no leveldbjni-1.2.18 in java.library.path: [/Users/userName/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], no leveldbjni in java.library.path: [/Users/userName/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], /private/var/folders/kl/lfx73rrs78j_649whqdtr_840000gn/T/libleveldbjni-64-1-4342940188945494583.2: dlopen(/private/var/folders/kl/lfx73rrs78j_649whqdtr_840000gn/T/libleveldbjni-64-1-4342940188945494583.2, 1): no suitable image found. Did find:
/private/var/folders/kl/lfx73rrs78j_649whqdtr_840000gn/T/libleveldbjni-64-1-4342940188945494583.2: no matching architecture in universal wrapper
/private/var/folders/kl/lfx73rrs78j_649whqdtr_840000gn/T/libleveldbjni-64-1-4342940188945494583.2: no matching architecture in universal wrapper]
at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)
at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)
at org.fusesource.leveldbjni.JniDBFactory.(JniDBFactory.java:48)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at com.wavesplatform.database.LevelDBFactory$.$anonfun$factory$3(LevelDBFactory.scala:21)
at com.wavesplatform.database.LevelDBFactory$.$anonfun$factory$2(LevelDBFactory.scala:21)
at com.wavesplatform.database.LevelDBFactory$.$anonfun$factory$1(LevelDBFactory.scala:20)
at scala.collection.Iterator$$anon$10.nextCur(Iterator.scala:585)
at scala.collection.Iterator$$anon$10.hasNext(Iterator.scala:599)
at scala.collection.IterableOps.headOption(Iterable.scala:227)
at scala.collection.IterableOps.headOption$(Iterable.scala:225)
at scala.collection.AbstractIterable.headOption(Iterable.scala:920)
at com.wavesplatform.database.LevelDBFactory$.factory$lzycompute(LevelDBFactory.scala:24)
at com.wavesplatform.database.LevelDBFactory$.factory(LevelDBFactory.scala:13)
at com.wavesplatform.database.package$.openDB(package.scala:51)
at com.wavesplatform.Application.(Application.scala:69)
at com.wavesplatform.Application$.$anonfun$startNode$4(Application.scala:564)
at com.wavesplatform.Application$.$anonfun$startNode$4$adapted(Application.scala:561)
at com.wavesplatform.actor.RootActorSystem$.start(RootActorSystem.scala:25)
at com.wavesplatform.Application$.startNode(Application.scala:561)
at com.wavesplatform.Application$.main(Application.scala:530)
at com.wavesplatform.Application.main(Application.scala)
2021-03-21 21:57:17,811 DEBUG [shutdownHook2] c.w.u.SystemInformationReporter$ - Available processors: 8
Max memory available: 2147483648
os.name: Mac OS X
os.version: 11.1
os.arch: aarch64
java.version: 11.0.10
java.vendor: Oracle Corporation
java.home: /opt/homebrew/Cellar/[email protected]/11.0.10/libexec/openjdk.jdk/Contents/Home
java.class.path: waves-all-1.2.18.jar
user.dir: /Users/userName/WAVES
sun.net.inetaddr.ttl: 0
sun.net.inetaddr.negative.ttl: 0
networkaddress.cache.ttl: null
networkaddress.cache.negative.ttl: null

Do you follow all steps here ? Install Node on macOS | Waves documentation

yes im trying 3 cases

(m1 native) zulu jdk 11 + waves node - error
(m1 native) homebrew-openjdk8, 11 + waves node - error

(rosetta) homebrew-adoptopenjdk8, 11 - works ok

You need arm64 version of leveldbjni library. In short:

  1. Install latest node release

  2. download https://dl.bintray.com/brox/leveldbjni/org/fusesource/leveldbjni/leveldbjni-all/1.21.1/leveldbjni-all-1.21.1.jar and move it to /usr/share/waves/lib

  3. open the executable /usr/share/waves/bin/waves in the text editor and replace the string org.ethereum.leveldbjni-all-1.18.3.jar with string leveldbjni-all-1.21.1.jar

  4. Profit!

But of course installing the node on Mac notebook is silly idea in the first place

thanks my issue has been fixed.