Following the guidelines for building from master a fresh react-native app fails to build.
Note this might just be my setup that is borken and this works for everyone else
npx @react-native-community/cli init Fresh cd Freshtar zxvf react-native-reanimated-2.0.0-alpha.tgz.zip to unpack zip (or unpack it manually)yarn add file:react-native-reanimated-2.0.0-*.tgz to install the packageyarn android:confetti_ball: we can consume the library from master and build our own in forks.
Crashes with
2020-09-09 16:25:02.508 12427-12427/com.fresh E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found: needed by /data/app/~~FYqq0YYE23kAAskuoVCuIA==/com.fresh-m-lO_Kd-Hl2axAk30cBdjQ==/lib/x86/libjscexecutor.so in namespace classloader-namespace result: 0
2020-09-09 16:25:03.947 12427-12469/com.fresh E/ReactNativeJNI: logMarker CREATE_REACT_CONTEXT_END
2020-09-09 16:25:03.950 12427-12468/com.fresh E/unknown:ReactNative: ReactInstanceManager.createReactContext: mJSIModulePackage not null
2020-09-09 16:25:04.073 12427-12468/com.fresh E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.fresh, PID: 12427
java.lang.UnsatisfiedLinkError: dlopen failed: library "libreanimated.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at com.swmansion.reanimated.NativeProxy.<clinit>(NativeProxy.java:26)
at com.swmansion.reanimated.NodesManager.initWithContext(NodesManager.java:122)
at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:18)
at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1256)
at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1016)
at java.lang.Thread.run(Thread.java:923)
Running into this issue on Ubuntu 20.04.1 LTS and on macOS 10.15.6
I'm looking into this myself, but if anyone knows of the top of their head what's going on that'd be great to hear :)
Also just if someone can confirm that installing from master works on their machine, then I know it's something funky in my setup.
@Ragnar-H I think there is some additional steps required before publishing to npm package.
So, basically, as far as I'm aware you can't take master and run. There is error saying no libreanimated.so....
This may be related to our configuration. We primarily are building Reanimated 2 on macOS which is case-insensitive by default and CI is a Linux machine. #1239 was submitted to fix this issue (new build should appear tomorrow).
I just tried installing Reanimated from master and seems working perfectly after cleaning the Gradle cache, so I think this could be it. I'll add this step to the installation docs, I'd be grateful if you could check if running ./gradlew clean in android/ resolves this crash for you.
@jakub-gonet with https://github.com/software-mansion/react-native-reanimated/pull/1239 merged this works as intended for me.
I didn't have to run ./gradlew clean in my case, but I wouldn't be surprised if clearing the cache is needed in other cases, so I think you're right to add this step to the installation docs :+1: