Firebaseui-android: Memory leak on AuthUI.getInstance()#signOut(Activity)

Created on 31 Jan 2017  路  4Comments  路  Source: firebase/FirebaseUI-Android

Describe your environment

  • Android device: Samsung Galaxy S6
  • Android OS version: 6.0.1
  • Google Play Services version: 10.0.1
  • Firebase/Play Services SDK version: 10.0.1
  • FirebaseUI version: got it both on 1.0.1 and on 1.1.1

Describe the problem:

After invoking AuthUI.getInstance.signOut(getActivity())from a fragment, LeakCanary reported a leak of the parent activity as it can be seen in the leak canary's report screenshot.

leak

Steps to reproduce:

  1. (In our case, we authenticated using the GoogleProvider directly instead of the wrapper. We're using the wrappers directly. Reference );
  2. Invoke AuthUI.getInstance.signOut(getActivity()) from a fragment and redirect the user to a new activity (for instance to reauthenticate again);
  3. Wait for LeakCanary to run and report the leak;

Observed Results:

Printscreen of the leak above ( _Describe the problem_ section).

auth fix-implemented bug

All 4 comments

@samtstern, I've noticed this leak several times, but I don't understand why it's happening since we remove the activity from INSTANCES. It's something we either have to rewrite or spend some quality time debugging. :smile:

@pedrodanielcsantos thanks for this report, we'll see what we can do to hunt this down

Thanks a lot @samtstern @SUPERCILEX ! If I can help in some way, just give me a shout 馃憤

The fix for this issue has been released in version 1.2.0.

Was this page helpful?
0 / 5 - 0 ratings