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 - App crashing on start in Android #298

Closed
medmo7 opened this issue Jan 4, 2022 · 8 comments
Closed

React native - App crashing on start in Android #298

medmo7 opened this issue Jan 4, 2022 · 8 comments

Comments

@medmo7
Copy link

medmo7 commented Jan 4, 2022

Description
The app crashes on start in Android device and emulator, when just installing the library

Expected behavior
The app should not crash

Logs

2022-01-04 11:02:19.754 6679-6728/com.indivibookvideo E/AndroidRuntime: FATAL EXCEPTION: create_react_context
    Process: com.indivibookvideo, PID: 6679
    java.lang.Error: FFmpegKit failed to start on brand: Redmi, model: M2103K19G, device: camellian, api level: 30, abis: arm64-v8a armeabi-v7a armeabi, 32bit abis: armeabi-v7a armeabi, 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:864)
        at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.registerGlobalCallbacks(FFmpegKitReactNativeModule.java:168)
        at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.<init>(FFmpegKitReactNativeModule.java:135)
        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:1347)
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1318)
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1240)
        at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131)
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1023)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_log_default_callback" referenced by "/data/app/~~ND_-wXIgMVuMMF9lccD4sg==/com.indivibookvideo--UwQec7E4IjmttOF7QiG9A==/lib/arm64/libffmpegkit.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:864) 
        at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.registerGlobalCallbacks(FFmpegKitReactNativeModule.java:168) 
        at com.arthenica.ffmpegkit.reactnative.FFmpegKitReactNativeModule.<init>(FFmpegKitReactNativeModule.java:135) 
        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:1347) 
        at com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1318) 
        at com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1240) 
        at com.facebook.react.ReactInstanceManager.access$1100(ReactInstanceManager.java:131) 
        at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1023) 
        at java.lang.Thread.run(Thread.java:923) 
2022-01-04 11:02:19.770 6679-6724/com.indivibookvideo E/ion: ioctl c0044901 failed with code -1: Invalid argument
2022-01-04 11:02:19.853 6679-6679/com.indivibookvideo E/SensorManager: Qcd unregisterListenerImpl, by:com.facebook.react.common.ShakeDetector

Environment

  • Platform: ReactNative

  • Version: v4.5

  • Source branch: main

  • react-native info: System: OS: macOS 11.4 CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Memory: 24.14 MB / 8.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.11.0 - /usr/local/bin/node Yarn: 1.22.17 - ~/Documents/dev/Upwork/RN/canvasRec/node_modules/.bin/yarn npm: 8.0.0 - /usr/local/bin/npm Watchman: 2021.10.04.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3 System Images: android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7583922 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-macos: Not Found npmGlobalPackages: *react-native*: Not Found

Other
Im using this to fix another issue

packagingOptions {
   pickFirst '**/*.so'
}
@dcboy
Copy link

dcboy commented Jan 8, 2022

same error with me

FFmpegKit failed to start on brand: Allwinner, model: PRODUCT, device: tulip-p1, api level: 23, abis: arm64-v8a armeabi-v7a armeabi, 32bit abis: armeabi-v7a armeabi, 64bit abis: arm64-v8a

@Sreekanth-KS
Copy link

Sreekanth-KS commented Jan 25, 2022

Same error I am also getting after installing the same

AndroidRuntime: java.lang.Error: FFmpegKit failed to start on brand: Android

Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "av_log_default_callback" referenced by "/data/app/~~iVKZfueqhT8wOsqwgXSF1A==/com.livebox-BmtByBsKmB4nRcVpG9j0JQ==/lib/x86/libffmpegkit.so"...

@courtneypresto
Copy link

Yup. I get the same error as @Sreekanth-KS

@github-actions
Copy link

github-actions bot commented Apr 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@salao-na-mao-developer
Copy link

Same here...

@DmytroMeleshko
Copy link

Any updates on this?

@tanersener
Copy link
Collaborator

There won't be any updates from us regarding this issue. We don't see this in the official test app we have under the ffmpeg-kit-test. And, none of the posts above share clear instructions to reproduce it. #215 explains how you can get help.

Explanation of that error is:

av_log_default_callback symbol, which is not found, belongs to a function defined in libavutil.so. And libavutil.so is one of the libraries that comes with ffmpeg. ffmpeg-kit bundles have libavutil.so inside. So, you are not expected to receive this error under normal circumstances.

If you get a cannot locate symbol "av_log_default_callback" error this means that:

  1. Either libavutil.so is not there
  2. libavutil.so is there but it doesn't have a av_log_default_callback function defined (you have a custom or old libavutil version)
  3. Something is preventing from loading libavutil.so

The first post has a pickFirst '**/*.so' in the build.gradle. Most probably it picks up .so files that are causing this.

@ILoveLin
Copy link

same error with me

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

No branches or pull requests

8 participants