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

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__gxx_personality_v0" #825

Closed
agolendukhin opened this issue Sep 8, 2023 · 6 comments · Fixed by #834
Assignees
Labels
android Affect Android platform bug Something isn't working fixed-in-v6.0-2 flutter Affect flutter platform react-native Affect react-native platform v6.0

Comments

@agolendukhin
Copy link

Description
App crashes with ffmpeg-kit-react-native installed on Android (v6.0.1). Any ideas on how to fix it?

Expected behavior
App runs without a crash

Current behavior
App crashes on start

To Reproduce
Steps to reproduce the behaviour.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs

java.lang.Error: FFmpegKit failed to start on brand: google, model: sdk_gphone_arm64, device: emulator_arm64, api level: 30, abis: arm64-v8a, 32bit abis: , 64bit abis: arm64-v8a.
                                                                                                    	at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50)
                                                                                                    	at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:189)
                                                                                                    	at com.arthenica.ffmpegkit.FFmpegKitConfig.<clinit>(FFmpegKitConfig.java:145)
                                                                                                    	at com.arthenica.ffmpegkit.FFmpegKitConfig.enableFFmpegSessionCompleteCallback(FFmpegKitConfig.java:870)
                                                                                                    	at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.registerGlobalCallbacks(FFmpegKitReactNativeModule.java:153)
                                                                                                    	at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.<init>(FFmpegKitReactNativeModule.java:133)
                                                                                                    	at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativePackage.createNativeModules(FFmpegKitReactNativePackage.java:37)
                                                                                                    	at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42)
                                                                                                    	at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42)
                                                                                                    	at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1467)
                                                                                                    	at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1438)
                                                                                                    	at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1340)
                                                                                                    	at com.facebook.react.ReactInstanceManager.-$$Nest$mcreateReactContext(Unknown Source:0)
                                                                                                    	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1111)
                                                                                                    	at java.lang.Thread.run(Thread.java:923)
                                                                                                    Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__gxx_personality_v0" referenced by "/data/app/~~kkx_yNeMTgqHBFm1tFgiXw==/com.app.international-0uT3bALm-ClQQl7B_1P4pA==/base.apk!/lib/arm64-v8a/libavcodec.so"...
                                                                                                    	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.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:48)
                                                                                                    	at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:189) 
                                                                                                    	at com.arthenica.ffmpegkit.FFmpegKitConfig.<clinit>(FFmpegKitConfig.java:145) 
                                                                                                    	at com.arthenica.ffmpegkit.FFmpegKitConfig.enableFFmpegSessionCompleteCallback(FFmpegKitConfig.java:870) 
                                                                                                    	at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.registerGlobalCallbacks(FFmpegKitReactNativeModule.java:153) 
                                                                                                    	at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.<init>(FFmpegKitReactNativeModule.java:133) 
                                                                                                    	at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativePackage.createNativeModules(FFmpegKitReactNativePackage.java:37) 
                                                                                                    	at com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42) 
                                                                                                    	at com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42) 
                                                                                                    	at com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1467) 
                                                                                                    	at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1438) 
                                                                                                    	at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1340) 
                                                                                                    	at com.facebook.react.ReactInstanceManager.-$$Nest$mcreateReactContext(Unknown Source:0) 
                                                                                                    	at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1111) 
                                                                                                    	at java.lang.Thread.run(Thread.java:923) 

Environment

Platform: React-native (Android)
Architecture: arm-v7a, arm-v7a-neon, arm64-v8a, x86, x86_64
Version: v6.0.1
Android NDK version: 25.2.9519653

build.gradle
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 24
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = '1.6.21'
detoxKotlinVersion = '1.6.21'
ndkVersion = "25.2.9519653"
ffmpegKitPackage = "audio"
}

@tanersener
Copy link
Collaborator

Since #292, ffmpeg-kit releases are built using NDK 22b. I believe building your app with a newer NDK version causes this issue. I suggest using an older NDK version if possible.

@tanersener tanersener added incompatibility android Affect Android platform react-native Affect react-native platform v6.0 flutter Affect flutter platform labels Sep 9, 2023
@agolendukhin
Copy link
Author

@tanersener tried to build with NDK 22b - the issue is the same. Any other idea which could help to fix it?

@agolendukhin
Copy link
Author

@tanersener btw I tried to build with v.4.5.2 (react-native) - and it works!

@tanersener tanersener added bug Something isn't working and removed incompatibility labels Sep 11, 2023
@tanersener tanersener assigned tanersener and unassigned tanersener Sep 11, 2023
@tanersener
Copy link
Collaborator

Since #292, ffmpeg-kit releases are built using NDK 22b. I believe building your app with a newer NDK version causes this issue. I suggest using an older NDK version if possible.

My assumption was wrong. There is a bug in the native audio package for Android (Both Main and LTS). ReactNative and Flutter plugins are affected from this bug too. We will have to patch v6.0 again.

suencooper added a commit that referenced this issue Sep 12, 2023
@suencooper suencooper self-assigned this Sep 17, 2023
@tanersener tanersener reopened this Sep 18, 2023
@tanersener
Copy link
Collaborator

This issue is fixed in:

  • v6.0-2 for Android
  • v6.0.2 for React-Native
  • v6.0.3 for Flutter

@HemangiVekaria
Copy link

HemangiVekaria commented Jun 25, 2024

This issue is still exist in v6.0-2 Android. I used this and in firebase i can see crashes like this

Fatal Exception: java.lang.Error: FFmpegKit failed to start on brand: HUAWEI, model: MED-LX9, device: HWMED-MR, api level: 29, abis: armeabi-v7a armeabi, 32bit abis: armeabi-v7a armeabi, 64bit abis: .
at com.arthenica.ffmpegkit.NativeLoader.loadLibrary(NativeLoader.java:50)
at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKitAbiDetect(NativeLoader.java:130)
at com.arthenica.ffmpegkit.AbiDetect.(AbiDetect.java:30)
at com.arthenica.ffmpegkit.AbiDetect.getNativeAbi(AbiDetect.java)
at com.arthenica.ffmpegkit.NativeLoader.loadNativeAbi(NativeLoader.java:65)
at com.arthenica.ffmpegkit.NativeLoader.loadFFmpegKit(NativeLoader.java:173)
at com.arthenica.ffmpegkit.FFmpegKitConfig.(FFmpegKitConfig.java:145)
at com.arthenica.ffmpegkit.FFmpegKitConfig.setLogLevel()
at com.MyApplication.onCreate(MyApplication.kt:54)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1202)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7351)
at android.app.ActivityThread.access$2400(ActivityThread.java:308)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2295)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8349)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Affect Android platform bug Something isn't working fixed-in-v6.0-2 flutter Affect flutter platform react-native Affect react-native platform v6.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants