Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react native v0.66.3 with reanimated not supported #92

Open
arasrezaei opened this issue Nov 19, 2021 · 7 comments
Open

react native v0.66.3 with reanimated not supported #92

arasrezaei opened this issue Nov 19, 2021 · 7 comments

Comments

@arasrezaei
Copy link

Hi there,
thanks for this great package,
I tried to test reanimated with V8 but it crushes the app while opening:

FATAL EXCEPTION: create_react_context

java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found

FATAL EXCEPTION: create_react_context
Process: com.qplusv8, PID: 6281
java.lang.UnsatisfiedLinkError: dlopen failed: library "libjsc.so" not found
	at java.lang.Runtime.loadLibrary0(Runtime.java:990)
	at java.lang.System.loadLibrary(System.java:1562)
	at com.swmansion.reanimated.NativeProxy.<clinit>(NativeProxy.java:23)
	at com.swmansion.reanimated.NodesManager.initWithContext(NodesManager.java:138)
	at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:18)
	at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1336)
	at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
	at java.lang.Thread.run(Thread.java:761)

I also tried your fork of reanimared (with changing reanimated arr from v0.65 to 0.66 :)) and this time got this error this time:

FATAL EXCEPTION: create_react_context

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook15createV8RuntimeERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE" referenced by "/data/app/com.qplusv8-1/lib/x86/libreanimated.so"...

FATAL EXCEPTION: create_react_context
Process: com.qplusv8, PID: 7478
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook15createV8RuntimeERKNSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE" referenced by "/data/app/com.qplusv8-1/lib/x86/libreanimated.so"...
	at java.lang.Runtime.loadLibrary0(Runtime.java:990)
	at java.lang.System.loadLibrary(System.java:1562)
	at com.swmansion.reanimated.NativeProxy.<clinit>(NativeProxy.java:22)
	at com.swmansion.reanimated.NodesManager.initWithContext(NodesManager.java:127)
	at com.swmansion.reanimated.ReanimatedJSIModulePackage.getJSIModules(ReanimatedJSIModulePackage.java:18)
	at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1336)
	at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:136)
	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1065)
	at java.lang.Thread.run(Thread.java:761)

is it possible to fix this?

@RodolfoGS
Copy link

Try removing exclude "**/libjsc.so" from your android/app/build.gradle

@arasrezaei
Copy link
Author

Try removing exclude "**/libjsc.so" from your android/app/build.gradle

Thanks, but with this method Javascript thread runs with V8 and for example reanimated worklets run with JSC. (Am I right?)
And having two engines will result in a large app size!

@jzxchiang1
Copy link

I got the same exact error but with v0.65 of react-native-v8. Any help appreciated!

@RodolfoGS
Copy link

@Kudo Do you know how to solve this? Thanks

@lkinasiewicz
Copy link

@Kudo I have already made the necessary changes here: https://github.com/lkinasiewicz/react-native-reanimated/commits/v8/2.3.1 - the last two commits.
Please let me know if you can create v8/2.3.1 branch in your repo so that I can make a pull request, or you can just cherry-pick my changes. I have tested this with RN 0.66.3 and works on Android (v8), Android TV (v8) and iOS (jsc). 0.65.2 should also work, but I haven't checked.

If anybody needs it now, you can use it this way:

  • clone my repo
  • make sure that you have wget, gradle and other android tools installed
  • run yarn
  • run ./createNPMPackage.sh
  • move the generated tar archive wherever you want and add it to your project, e.g. from your project's directory: yarn add ./react-native-reanimated-2.3.1.tgz; yarn

@jzxchiang1
Copy link

This is so painful to keep react-native, react-native-reanimated, and react-native-v8 all in sync.

I hope the reanimated team can officially support v8 soon. It's been months and haven't heard anything..

@jzxchiang1
Copy link

0.67 just got published - has anyone tried to see if it works with reanimated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants