-
Notifications
You must be signed in to change notification settings - Fork 658
Description
[REQUIRED] Step 2: Describe your environment
- Android Studio version: 4.1.1
- Firebase Component: Auth (Database, Firestore, Storage, Functions, etc)
- Component version: 29.0.2
[REQUIRED] Step 3: Describe the problem
Adding com.google.firebase:firebase-auth to an Android project leads to a memory leak of a (totally unrelated) dialog fragment:

This memory leak does not appear when not using 'firebase-auth'.
Steps to reproduce:
Please see the following repository with a minimal example to reproduce the memory leak: https://github.com/dvdhfnr/firebase-auth-memory-leak
By default, firebase-auth is not used. Pressing the button, which opens a dialogFragment, multiple times does not create any memory leak; checked via memory heap dump in the Android studio profiler.
When uncommenting Line 44 in app/build.gradle (implementation 'com.google.firebase:firebase-auth') and repeating the above experiment (i.e. pressing the Button multiple times), we observe above memory leak. Neither the activity nor the dialog fragment implement any firebase code, only adding implementation 'com.google.firebase:firebase-auth' to the gradle.build seems to cause this issue.