react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

Android Crash: com.google.android.gms.common.internal.zzbr.zzcF

Open jpokrzyk opened this issue 9 years ago • 4 comments

Not sure what this is yet. I don't think it's necessary a bug with this lib, but just thought I would post here to see if anyone else is seeing this.

I'm getting these stack traces from android deployed apps via Bugsnag. I'm not able to reproduce yet. If anyone has any ideas please let me know. I'll follow up here if I find more details.

I haven't even dug through the react-native-firebase source yet and I probably won't be able to until tomorrow sometime.

java.lang.IllegalArgumentException Given String is empty or null 
    Unknown:-1 com.google.android.gms.common.internal.zzbr.zzcF
    Unknown:-1 com.google.firebase.auth.FirebaseAuth.signInWithEmailAndPassword
    RNFirebaseAuth.java:179 io.invertase.firebase.auth.RNFirebaseAuth.signInWithEmailAndPassword
    Method.java:-2 java.lang.reflect.Method.invoke
    JavaMethodWrapper.java:372 com.facebook.react.cxxbridge.JavaMethodWrapper.invoke
    JavaModuleWrapper.java:162 com.facebook.react.cxxbridge.JavaModuleWrapper.invoke
    NativeRunnable.java:-2 com.facebook.react.bridge.queue.NativeRunnable.run
    Handler.java:739 android.os.Handler.handleCallback
    Handler.java:95 android.os.Handler.dispatchMessage
    MessageQueueThreadHandler.java:31 com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage
    Looper.java:158 android.os.Looper.loop
    MessageQueueThreadImpl.java:199 com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run
    Thread.java:818 java.lang.Thread.run

I have code that prevents the user from attempting to sign in with an empty email/password. So there shouldn't be a situation where the user has submitted an empty email/password (but even if they did it seems weird that would crash google's java code).

Environment

  1. Target Platform (e.g. iOS, Android): Seems to be affecting only android
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS Sierra
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): android sdk 25.0.2
  4. React Native version (e.g. 0.45.1):0.47.1
  5. RNFirebase Version (e.g. 2.0.2): v2.1.0 (but I'm pulling directly from master/head)

jpokrzyk avatar Aug 07 '17 14:08 jpokrzyk

It looks as though you're calling signInWithEmailAndPassword with no arguments... Shouldn't be causing a crash though!

Ehesp avatar Aug 07 '17 14:08 Ehesp

Yea actually I just tried to reproduce it and it was that simple (hit 'sign in' with no email/password). My form validation code must have got lost somewhere, debugging now.

@Ehesp but yea I have the same question. That seems weird it would take down the app.

jpokrzyk avatar Aug 07 '17 15:08 jpokrzyk

@Ehesp @jpokrzyk it's a known issue with the firebase android sdk that all the user methods throw an exception when arguments are invalid - instead of actually going into the failure listener like you'd think it would.

Needs fixing firebase end ideally but doubt it's something that's going to change, so we may end up shoving try catch blocks around all of them on our end, which isn't the nicest solution.

Salakar avatar Aug 07 '17 15:08 Salakar

@Salakar Got it thanks. Huh that's crazy. That seems like smelly code but still the appropriate thing to do in this situation. Especially since google hasn't opened sourced the android sdk yet.

Feel free to close this out. I'm going to leave it open so there's a place for the java dev work to be discussed (if that's what you want to do).

At least this is documented here now. Thanks for the super quick responses.

jpokrzyk avatar Aug 07 '17 15:08 jpokrzyk