facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
119.28k stars 24.35k forks source link

After upgrading 0.68.2 to 0.68.5 received runtime error #35324

Closed sabishm closed 1 year ago

sabishm commented 2 years ago

Description

I have existing project with react-native:0.68.2 and i integrate the android zoom sdk it's working fine with debug build. But while take the release build i received the error. Based on this ticket i changed my version to 0.68.5 that build error is gone. But i received runtime error in both debug and release build.

runtime.cc:669] Pending exception java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~r9LUpbAZZ1c128ELP-daLA==/com.shankarias685-aov90I52_ZW0Km_8suUnGA==/lib/arm/libannotate.so"... runtime.cc:669] at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1077) runtime.cc:669] at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:998) runtime.cc:669] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1656) runtime.cc:669] at void com.zipow.videobox.mainboard.module.ZmSdkMainBoard.loadSDKConfAppNativeModules() (ZmSdkMainBoard.java:8) runtime.cc:669] at void com.zipow.videobox.mainboard.module.ZmSdkMainBoard.createConfAppForSdk(java.lang.String) (ZmSdkMainBoard.java:8) runtime.cc:669] at void com.zipow.videobox.VideoBoxApplication.initConfAppForSDK(java.lang.String) (VideoBoxApplication.java:23) runtime.cc:669] at int com.zipow.videobox.VideoBoxApplication.startConfServiceForSDK(android.os.Bundle) (VideoBoxApplication.java:8) runtime.cc:669] at int com.zipow.videobox.ptapp.ConfProcessMgr.createConfProcess(java.lang.String) (ConfProcessMgr.java:15) runtime.cc:669] at void com.zipow.videobox.mainboard.Mainboard.notifyUrlActionImpl(java.lang.String) (Mainboard.java:-2) runtime.cc:669] at void com.zipow.videobox.mainboard.Mainboard.notifyUrlAction(java.lang.String) (Mainboard.java:6)

But same code working fine with 0.68.2 debug build. But in 0.68.5 it's not working.

Please someone help.

Thanks.

Version

0.68.5

Output of npx react-native info

System: OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish) CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz Memory: 7.34 GB / 19.31 GB Shell: 5.1.16 - /bin/bash Binaries: Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node Yarn: 1.22.5 - /usr/bin/yarn npm: 8.5.3 - ~/.nvm/versions/node/v16.14.0/bin/npm Watchman: Not Found SDKs: Android SDK: Not Found IDEs: Android Studio: Not Found Languages: Java: 11.0.17 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.5 => 0.68.5 npmGlobalPackages: react-native: Not Found

Steps to reproduce

Create new project with 0.68.5 version.

Integrate android zoom sdk.

Join some meeting.

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

image

cortinico commented 1 year ago

runtime.cc:669] Pending exception java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~r9LUpbAZZ1c128ELP-daLA==/com.shankarias685-aov90I52_ZW0Km_8suUnGA==/lib/arm/libannotate.so"... runtime.cc:669] at void

That's an error caused by the Zoom SDK (we don't control libannotate.so). You should open an issue for them

volgar1x commented 1 year ago

I have the same problem with react-native-mmkv.

It seems it requires __emutls_get_address function to be defined, and although it's usually provided by libc++_shared.so, it does not seem to be the case when using NDK 24 on an Apple M1 CPU.

System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1
    Memory: 88.38 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - /opt/homebrew/opt/node@18/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.19.2 - /opt/homebrew/opt/node@18/bin/npm
    Watchman: 2022.11.28.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK: Not Found
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8815526
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: ^9.3.2 => 9.3.2
    react: ~18.1.0 => 18.1.0
    react-native: ~0.70.4 => 0.70.6
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
$ echo $ANDROID_HOME
/Users/volgar1x/Library/Android/sdk
$ ls $ANDROID_HOME/ndk
24.0.8215888

It seems to be building just fine on a Fedora desktop with the same dependencies but with an older NDK (21.4.7075529).

mohitarora777 commented 1 year ago

Same issue with react-native-mmkv-storage https://github.com/ammarahm-ed/react-native-mmkv-storage/issues/312

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 7 days with no activity.

flyskywhy commented 3 months ago

No need to rebuild third-party .aar or .so, just patch:

cd tools/android-sdk/ndk

mv ./21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/origin_libc++_shared.so
cp ./23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc++_shared.so ./21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/

as described in Patch to fix __emutls_get_address crash on Android