FirebaseUI-Android icon indicating copy to clipboard operation
FirebaseUI-Android copied to clipboard

NPE when dismissing loading dialog

Open abdulwasae opened this issue 9 years ago • 6 comments

The dismissLoadingDialog() method in PhoneVerificationActivity throws NPE at mProgressDialog.dismissAllowingStateLoss();

Here is the stacktrace:

arrow_drop_down Exception java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v4.app.FragmentTransaction android.support.v4.app.FragmentManager.beginTransaction()' on a null object reference android.support.v4.app.DialogFragment.dismissInternal (DialogFragment.java:200) android.support.v4.app.DialogFragment.dismissAllowingStateLoss (DialogFragment.java:181) com.firebase.ui.auth.ui.phone.PhoneVerificationActivity.dismissLoadingDialog (PhoneVerificationActivity.java:398) com.firebase.ui.auth.ui.phone.PhoneVerificationActivity.access$000 (PhoneVerificationActivity.java:55) com.firebase.ui.auth.ui.phone.PhoneVerificationActivity$1.run (PhoneVerificationActivity.java:201) android.os.Handler.handleCallback (Handler.java:739) android.os.Handler.dispatchMessage (Handler.java:95) android.os.Looper.loop (Looper.java:135) android.app.ActivityThread.main (ActivityThread.java:5254) java.lang.reflect.Method.invoke (Method.java) java.lang.reflect.Method.invoke (Method.java:372) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:903) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:698)

abdulwasae avatar Oct 18 '17 04:10 abdulwasae

@abdulwasae Yep, we're rewriting FirebaseUI to fix the fundamental issues behind this.

@samtstern Lol, told ya it wasn't going to work. We tried so hard though! 😆 You could add a null check for the FragmentManager but it's kinda hopeless at this point.

SUPERCILEX avatar Oct 18 '17 04:10 SUPERCILEX

@abdulwasae sitting at office. Fixing useless bugs.

quantumInfection avatar Oct 18 '17 04:10 quantumInfection

@samtstern, @SUPERCILEX, any visibility on when this change will be released? Have a bunch of apps in production that are seeing this problem :(

ismail-khan avatar Oct 24 '17 08:10 ismail-khan

@ismail-khan no fixed deadlines right now, we want to get a few other fixes in 3.1.1.

If you really need to use it right now you can always check out the development branch and create a local build.

Can you reproduce this problem yourself, or only seeing it in crash reports?

samtstern avatar Oct 24 '17 15:10 samtstern

@samtstern only in crash reports so far. Think we'll just check out the dev branch for now. Thanks for the info!

ismail-khan avatar Oct 24 '17 15:10 ismail-khan

This is fixed in version 3.1.1.

samtstern avatar Dec 14 '17 23:12 samtstern