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

Current jsc-android prebuilt mismatch NDK version with template app #36052

Closed
kraenhansen opened this issue Feb 3, 2023 · 1 comment
Closed
Labels
Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Comments

@kraenhansen
Copy link
Contributor

kraenhansen commented Feb 3, 2023

Description

As per this PR, version 250230.2.1 of the jsc-android package was built with an old NDK version (r19c / 19.2.5345600). This conflicts with the current React Native template which uses NDK 23.1.7779620, which got updated in v0.71.0.

These versions must match. If they don't any exception thrown by JSC wont be catchable by calling code (React Native) and will lead to crashes instead of runtime error.

One workaround is for end-users to override the version of jsc-android used by react-native in their package.json:

"overrides": {
    "react-native": {
        "jsc-android": "294992.0.0"
    }
}

Version

0.71.0

Output of npx react-native info

info Fetching system and libraries information...
System:
    OS: macOS 12.6.2
    CPU: (8) arm64 Apple M1
    Memory: 89.33 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.18.0/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
    Watchman: 2022.12.05.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 28, 31, 33
      Build Tools: 30.0.3, 31.0.0, 33.0.0
      System Images: android-29 | Intel x86 Atom, android-33 | Google APIs ARM 64 v8a, android-33 | Google APIs Intel x86 Atom_64
      Android NDK: 23.1.7779620
  IDEs:
    Android Studio: 2022.1 AI-221.6008.13.2211.9514443
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 18.0.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.0 => 0.71.0 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  • Initialise the 0.71.0 version of the template.
  • Turn off Hermes on Android.
  • Make JSC throw an error:
    • One example is calling console.log(0n) in the top of the index.js.
    • Another is throwing from a JS function called via JSC from C++ (a bit more involved)
  • Run the app on Android and watch the crash 💥

Snack, code example, screenshot, or link to a repository

This is the stack on a crash from console.log(0n) on an arm64 emulator:

art_sigsegv_fault 0x00000074912880a0
art::FaultManager::HandleFault(int, siginfo*, void*) 0x00000074912884b8
art::SignalChain::Handler(int, siginfo*, void*) 0x0000007741a21324
<unknown> 0x000000774ad9084c
<unknown> 0x000000741012923c

The same crash on an x86_64 emulator:

(lldb) bt
* thread #40, name = 'mqt_js', stop reason = breakpoint 1.1
  * frame #0: 0x0000738e93640da0 libart.so`art_sigsegv_fault
    frame #1: 0x0000738e936412a5 libart.so`art::FaultManager::HandleFault(int, siginfo*, void*) + 373
    frame #2: 0x000057561408cb0b app_process64`art::SignalChain::Handler(int, siginfo*, void*) + 603
    frame #3: 0x00007391274e70f0 libc.so`__restore_rt
    frame #4: 0x0000000000000000
    frame #5: 0x0000738e38f933da libc++_shared.so`___lldb_unnamed_symbol3538 + 10
    frame #6: 0x0000738e38f9315c libc++_shared.so`___lldb_unnamed_symbol3525 + 12
    frame #7: 0x0000738e38f8f6b3 libc++_shared.so`___lldb_unnamed_symbol3449 + 131
    frame #8: 0x0000738e38f8f4e8 libc++_shared.so`__gxx_personality_v0 + 136
    frame #9: 0x0000738e38c48409 libjsc.so`___lldb_unnamed_symbol15644 + 124
    frame #10: 0x0000738e38c48872 libjsc.so`_Unwind_Resume + 91
    frame #11: 0x0000738e3a0b1789 libjscexecutor.so`facebook::jsc::JSCRuntime::evaluateJavaScript(std::__ndk1::shared_ptr<facebook::jsi::Buffer const> const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&) + 569
    frame #12: 0x0000738e3a0a902e libjscexecutor.so`facebook::react::JSIExecutor::loadBundle(std::__ndk1::unique_ptr<facebook::react::JSBigString const, std::__ndk1::default_delete<facebook::react::JSBigString const> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >) + 350
    frame #13: 0x0000738e392687a7 libreactnativejni.so`___lldb_unnamed_symbol16460 + 311
    frame #14: 0x0000738e39268652 libreactnativejni.so`___lldb_unnamed_symbol16458 + 50
    frame #15: 0x0000738e392685f2 libreactnativejni.so`___lldb_unnamed_symbol16456 + 50
    frame #16: 0x0000738e392685b2 libreactnativejni.so`___lldb_unnamed_symbol16455 + 50
    frame #17: 0x0000738e39267411 libreactnativejni.so`___lldb_unnamed_symbol16383 + 49
    frame #18: 0x0000738e3927412a libreactnativejni.so`___lldb_unnamed_symbol17215 + 74
    frame #19: 0x0000738e3927409a libreactnativejni.so`std::__ndk1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const + 58
    frame #20: 0x0000738e39274057 libreactnativejni.so`___lldb_unnamed_symbol17213 + 87
    frame #21: 0x0000738e39273fdd libreactnativejni.so`___lldb_unnamed_symbol17211 + 29
    frame #22: 0x0000738e39273f8d libreactnativejni.so`___lldb_unnamed_symbol17209 + 29
    frame #23: 0x0000738e39273f5d libreactnativejni.so`___lldb_unnamed_symbol17208 + 29
    frame #24: 0x0000738e39272e29 libreactnativejni.so`___lldb_unnamed_symbol17134 + 25
    frame #25: 0x0000738e391b59c2 libreactnativejni.so`___lldb_unnamed_symbol11903 + 50
    frame #26: 0x0000738e391b58d5 libreactnativejni.so`std::__ndk1::function<void ()>::operator()() const + 21
    frame #27: 0x0000738e391d4b95 libreactnativejni.so`___lldb_unnamed_symbol12847 + 101
    frame #28: 0x0000738e391d4b0d libreactnativejni.so`___lldb_unnamed_symbol12845 + 29
    frame #29: 0x0000738e391d4abd libreactnativejni.so`___lldb_unnamed_symbol12843 + 29
    frame #30: 0x0000738e391d4a8d libreactnativejni.so`___lldb_unnamed_symbol12842 + 29
    frame #31: 0x0000738e391d3a19 libreactnativejni.so`___lldb_unnamed_symbol12769 + 25
    frame #32: 0x0000738e39fa297a libfbjni.so`facebook::jni::detail::MethodWrapper<void (facebook::jni::JNativeRunnable::*)(), &(facebook::jni::JNativeRunnable::run()), facebook::jni::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>) + 26
    frame #33: 0x0000738e39fa28f5 libfbjni.so`facebook::jni::detail::FunctionWrapper<void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>), facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*, void>::call(_JNIEnv*, _jobject*, void (*)(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject*>)) + 53
    frame #34: 0x0000738e935180c8 libart.so`art_quick_generic_jni_trampoline + 216
    frame #35: 0x0000738e9350ccb5 libart.so`art_quick_invoke_stub + 757
    frame #36: 0x0000738e9359fa93 libart.so`art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) + 243
    frame #37: 0x0000738e9373bad6 libart.so`art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*) + 358
    frame #38: 0x0000738e93730415 libart.so`bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) + 1253
    frame #39: 0x0000738e93525c03 libart.so`void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*) + 36915
    frame #40: 0x0000738e9351a166 libart.so`ExecuteSwitchImplAsm + 6
    frame #41: 0x0000738e93726cd7 libart.so`art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17093650825981166841) + 679
    frame #42: 0x0000738e9372f8c9 libart.so`art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*) + 201
    frame #43: 0x0000738e937303fa libart.so`bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) + 1226
    frame #44: 0x0000738e9352401e libart.so`void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*) + 29774
    frame #45: 0x0000738e9351a166 libart.so`ExecuteSwitchImplAsm + 6
    frame #46: 0x0000738e93726cd7 libart.so`art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17093650825981166841) + 679
    frame #47: 0x0000738e9372f8c9 libart.so`art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*) + 201
    frame #48: 0x0000738e937303fa libart.so`bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) + 1226
    frame #49: 0x0000738e935281fd libart.so`void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*) + 46637
    frame #50: 0x0000738e9351a166 libart.so`ExecuteSwitchImplAsm + 6
    frame #51: 0x0000738e93726cd7 libart.so`art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17093650825981166841) + 679
    frame #52: 0x0000738e9372f8c9 libart.so`art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*) + 201
    frame #53: 0x0000738e937303fa libart.so`bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) + 1226
    frame #54: 0x0000738e93525f91 libart.so`void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*) + 37825
    frame #55: 0x0000738e9351a166 libart.so`ExecuteSwitchImplAsm + 6
    frame #56: 0x0000738e93726cd7 libart.so`art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17093650825981166841) + 679
    frame #57: 0x0000738e9372f8c9 libart.so`art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*) + 201
    frame #58: 0x0000738e937303fa libart.so`bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) + 1226
    frame #59: 0x0000738e9352401e libart.so`void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*) + 29774
    frame #60: 0x0000738e9351a166 libart.so`ExecuteSwitchImplAsm + 6
    frame #61: 0x0000738e93726cd7 libart.so`art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17093650825981166841) + 679
    frame #62: 0x0000738e9372f8c9 libart.so`art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*) + 201
    frame #63: 0x0000738e937303fa libart.so`bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*) + 1226
    frame #64: 0x0000738e93525c03 libart.so`void art::interpreter::ExecuteSwitchImplCpp<false, false>(art::interpreter::SwitchImplContext*) + 36915
    frame #65: 0x0000738e9351a166 libart.so`ExecuteSwitchImplAsm + 6
    frame #66: 0x0000738e93726cd7 libart.so`art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.17093650825981166841) + 679
    frame #67: 0x0000738e93b0a5b0 libart.so`artQuickToInterpreterBridge + 1104
    frame #68: 0x0000738e9351824d libart.so`art_quick_to_interpreter_bridge + 141
    frame #69: 0x0000738e9350ccb5 libart.so`art_quick_invoke_stub + 757
    frame #70: 0x0000738e9359fa93 libart.so`art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*) + 243
    frame #71: 0x0000738e939be1bf libart.so`art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*) + 479
    frame #72: 0x0000738e93a21844 libart.so`art::Thread::CreateCallback(void*) + 1412
    frame #73: 0x0000739127554d2b libc.so`__pthread_start(void*) + 59
    frame #74: 0x00007391274ec0c8 libc.so`__start_thread + 56
@kraenhansen
Copy link
Contributor Author

I've created an issue on the jsc-android repo as well: react-native-community/jsc-android-buildscripts#178

cipolleschi pushed a commit that referenced this issue Feb 13, 2023
Summary:
the current jsc-android is still built based on ndk r21, and react-native is now built based on ndk r23. the unwinder between r21 and r23 is incompatible (libgcc vs libunwind). if there's exceptions throwing from jsc, other react native libraries cannot catch these exceptions and cause runtime crash.

this pr updates jsc-android to 235231.0.0 which is the same webkitgtk version as 235230.2.1 but only built by ndk r23. the jsc-android pr is from react-native-community/jsc-android-buildscripts#179. note that the jsc is based on ndk r23c and react-native is based on ndk r23b. the reason is that i cannot get jsc building successfully on r23b. hopefully r23b and r23c are abi safe.

there is another crash from libjscexecutor when testing the new jsc-android. to fix the issue, i have to explicitly link libunwind.a from libjscexecutor.so. supposedly ndk r23 should help to link libunwind under the hood, i still not figure out why it doesn't. but after linking libunwind.a, i can get new jsc-android work successfully.

```
E/art     ( 2669): dlopen("/data/app/com.test-1/lib/x86_64/libjscexecutor.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): 	at java.lang.Runtime.load(Runtime.java:331)
W/System.err( 2669): 	at java.lang.System.load(System.java:982)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader$1.load(SoLoader.java:558)
W/System.err( 2669): 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110)
W/System.err( 2669): 	at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:63)
W/System.err( 2669): 	at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:91)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1067)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
W/System.err( 2669): 	at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
W/System.err( 2669): 	at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20)
W/System.err( 2669): 	at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:363)
W/System.err( 2669): 	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:316)
W/System.err( 2669): 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94)
W/System.err( 2669): 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
W/System.err( 2669): 	at com.test.MainApplication.onCreate(MainApplication.java:60)
W/System.err( 2669): 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
W/System.err( 2669): 	at androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:483)
W/System.err( 2669): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
W/System.err( 2669): 	at android.app.ActivityThread.access$1500(ActivityThread.java:144)
W/System.err( 2669): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
W/System.err( 2669): 	at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 2669): 	at android.os.Looper.loop(Looper.java:135)
W/System.err( 2669): 	at android.app.ActivityThread.main(ActivityThread.java:5221)
W/System.err( 2669): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 2669): 	at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err( 2669): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
W/System.err( 2669): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
```

fixes #36052

## Changelog

[ANDROID][FIXED] - Fixed jscexecutor crash on Android which is caused from NDK incompatibility

Pull Request resolved: #36062

Test Plan: tested on [jsc-android instrumented test](https://github.com/react-native-community/jsc-android-buildscripts/tree/2.26.1/test) (based on react-native 0.71.2)

Reviewed By: cipolleschi

Differential Revision: D43040295

Pulled By: cortinico

fbshipit-source-id: e0e5b8fb7faa8ee5654d4cde5f274bef4b517376
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this issue May 22, 2023
Summary:
the current jsc-android is still built based on ndk r21, and react-native is now built based on ndk r23. the unwinder between r21 and r23 is incompatible (libgcc vs libunwind). if there's exceptions throwing from jsc, other react native libraries cannot catch these exceptions and cause runtime crash.

this pr updates jsc-android to 235231.0.0 which is the same webkitgtk version as 235230.2.1 but only built by ndk r23. the jsc-android pr is from react-native-community/jsc-android-buildscripts#179. note that the jsc is based on ndk r23c and react-native is based on ndk r23b. the reason is that i cannot get jsc building successfully on r23b. hopefully r23b and r23c are abi safe.

there is another crash from libjscexecutor when testing the new jsc-android. to fix the issue, i have to explicitly link libunwind.a from libjscexecutor.so. supposedly ndk r23 should help to link libunwind under the hood, i still not figure out why it doesn't. but after linking libunwind.a, i can get new jsc-android work successfully.

```
E/art     ( 2669): dlopen("/data/app/com.test-1/lib/x86_64/libjscexecutor.so", RTLD_LAZY) failed: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app/com.test-1/lib/x86_64/libjscexecutor.so"...
W/System.err( 2669): 	at java.lang.Runtime.load(Runtime.java:331)
W/System.err( 2669): 	at java.lang.System.load(System.java:982)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader$1.load(SoLoader.java:558)
W/System.err( 2669): 	at com.facebook.soloader.DirectorySoSource.loadLibraryFrom(DirectorySoSource.java:110)
W/System.err( 2669): 	at com.facebook.soloader.DirectorySoSource.loadLibrary(DirectorySoSource.java:63)
W/System.err( 2669): 	at com.facebook.soloader.ApplicationSoSource.loadLibrary(ApplicationSoSource.java:91)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:1067)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibraryBySoNameImpl(SoLoader.java:943)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:855)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:802)
W/System.err( 2669): 	at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:772)
W/System.err( 2669): 	at com.facebook.react.jscexecutor.JSCExecutor.loadLibrary(JSCExecutor.java:24)
W/System.err( 2669): 	at com.facebook.react.jscexecutor.JSCExecutor.<clinit>(JSCExecutor.java:20)
W/System.err( 2669): 	at com.facebook.react.ReactInstanceManagerBuilder.getDefaultJSExecutorFactory(ReactInstanceManagerBuilder.java:363)
W/System.err( 2669): 	at com.facebook.react.ReactInstanceManagerBuilder.build(ReactInstanceManagerBuilder.java:316)
W/System.err( 2669): 	at com.facebook.react.ReactNativeHost.createReactInstanceManager(ReactNativeHost.java:94)
W/System.err( 2669): 	at com.facebook.react.ReactNativeHost.getReactInstanceManager(ReactNativeHost.java:41)
W/System.err( 2669): 	at com.test.MainApplication.onCreate(MainApplication.java:60)
W/System.err( 2669): 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
W/System.err( 2669): 	at androidx.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:483)
W/System.err( 2669): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4518)
W/System.err( 2669): 	at android.app.ActivityThread.access$1500(ActivityThread.java:144)
W/System.err( 2669): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
W/System.err( 2669): 	at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err( 2669): 	at android.os.Looper.loop(Looper.java:135)
W/System.err( 2669): 	at android.app.ActivityThread.main(ActivityThread.java:5221)
W/System.err( 2669): 	at java.lang.reflect.Method.invoke(Native Method)
W/System.err( 2669): 	at java.lang.reflect.Method.invoke(Method.java:372)
W/System.err( 2669): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
W/System.err( 2669): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
```

fixes facebook#36052

## Changelog

[ANDROID][FIXED] - Fixed jscexecutor crash on Android which is caused from NDK incompatibility

Pull Request resolved: facebook#36062

Test Plan: tested on [jsc-android instrumented test](https://github.com/react-native-community/jsc-android-buildscripts/tree/2.26.1/test) (based on react-native 0.71.2)

Reviewed By: cipolleschi

Differential Revision: D43040295

Pulled By: cortinico

fbshipit-source-id: e0e5b8fb7faa8ee5654d4cde5f274bef4b517376
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants