React-native-firebase: RNFirebase V3 dont work in Android 4.4.2 KitKat - bug

Created on 23 Oct 2017  路  6Comments  路  Source: invertase/react-native-firebase

I followed all the steps indicates in the page and use the last version of this lib, when I run in my cellphone a Android 4.4.2 the app crash without indicating any error but when i run the same app in a Android 7.1 the app works perfectly and I could get and post data.

So I decide change the version for react-native-firebase 2.1.4, when I did the respective changes according to the version, the app works perfectly again. I thinks that the libs have errors with android < v7

I don't have the code because I change the version, sorry.

React - Native: v0.49
RNFirebase: 3.0 - error
RNFirebase: 2.1.4 - works!

Waiting for User Response

Most helpful comment

Thanks for the stack trace @agumack

A quick google search indicates that this might be a MultiDex error and is Firebase related rather than RNFirebase.

Please check the following Stack Overflow posts:

https://stackoverflow.com/questions/39206299/unable-to-get-provider-com-google-firebase-provider-firebaseinitprovider-error
https://stackoverflow.com/questions/39825543/didnt-find-class-com-google-firebase-provider-firebaseinitprovider

I'm going to close this as it's not really a RNFirebase issue and these articles should help you resolve the issue.

All 6 comments

Logs? Errors?

no logs, no errors, build usually but crash when I launch the app in Android 4.4.2 and when i launch in android 7.1 works perfectly.

Run adb logcat - there will be an Exception somewhere in the logs explaining why it is crashing

No error for me. I'm using messaging and analytics modules.
Android: 4.4.2 (emulator)
React Native: 0.48.4
React native firebase: 3.0.3

Logs will help a lot. Which firebase sdk modules are you using ?

Yep, I have same problem.
And only on Android 4.4.2
On android 5, 7 works perfectly but a dialog with message "this app won't run without google play services which are missing from your phone" after i update Google Play service on drive then good.
This is log:

E/AndroidRuntime(12367): FATAL EXCEPTION: main
E/AndroidRuntime(12367): Process: com.ubercore, PID: 12367
E/AndroidRuntime(12367): java.lang.RuntimeException: Unable to get provider com.google.firebase.perf.provider.FirebasePerfProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.perf.provider.FirebasePerfProvider" on path: DexPathList[[zip file "/data/app/com.ubercore-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ubercore-1, /vendor/lib, /system/lib]]
E/AndroidRuntime(12367): at android.app.ActivityThread.installProvider(ActivityThread.java:4843)
E/AndroidRuntime(12367): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4435)
E/AndroidRuntime(12367): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4375)
E/AndroidRuntime(12367): at android.app.ActivityThread.access$1600(ActivityThread.java:141)
E/AndroidRuntime(12367): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1273)
E/AndroidRuntime(12367): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(12367): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(12367): at android.app.ActivityThread.main(ActivityThread.java:5072)
E/AndroidRuntime(12367): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(12367): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(12367): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime(12367): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
E/AndroidRuntime(12367): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(12367): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.perf.provider.FirebasePerfProvider" on path: DexPathList[[zip file "/data/app/com.ubercore-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.ubercore-1, /vendor/lib, /system/lib]]
E/AndroidRuntime(12367): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
E/AndroidRuntime(12367): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
E/AndroidRuntime(12367): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
E/AndroidRuntime(12367): at android.app.ActivityThread.installProvider(ActivityThread.java:4828)
E/AndroidRuntime(12367): ... 12 more

Thanks for the stack trace @agumack

A quick google search indicates that this might be a MultiDex error and is Firebase related rather than RNFirebase.

Please check the following Stack Overflow posts:

https://stackoverflow.com/questions/39206299/unable-to-get-provider-com-google-firebase-provider-firebaseinitprovider-error
https://stackoverflow.com/questions/39825543/didnt-find-class-com-google-firebase-provider-firebaseinitprovider

I'm going to close this as it's not really a RNFirebase issue and these articles should help you resolve the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mahyarr picture mahyarr  路  3Comments

romreed picture romreed  路  3Comments

callmejm picture callmejm  路  3Comments

joecaraccio picture joecaraccio  路  3Comments

jonaseck2 picture jonaseck2  路  3Comments