Memory leak in FirebaseInAppMessagingDisplay
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment
- Android Studio version: Android Studio Meerkat | 2024.3.1 Patch 2___
- Firebase Component: __ implementation("com.google.firebase:firebase-inappmessaging-display") ___ (Database, Firestore, Storage, Functions, etc)
- Component version: _____
[REQUIRED] Step 3: Describe the problem
Just implement this library and see allocations grow to infinity.
See similar issue here which was closed years ago:
https://github.com/firebase/firebase-android-sdk/issues/482
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @ronenfe, thank you for reaching out. I tried reproducing the issue, but I did not encounter a memory leak. I saw your comment here (https://github.com/firebase/firebase-android-sdk/issues/5076#issuecomment-2839206320) and check the findings mentioned in this comment https://github.com/firebase/firebase-android-sdk/issues/5076#issuecomment-1589720405, however, I still did not see the memory leak.
I'm using Firebase BOM v33.13.0, can you share the Firebase version you're using?
Hi, i use the same bom version. Let me try it on a sample project.
https://github.com/ronenfe/testFirebase, run and see in profiler growth of allocations, remove implementation("com.google.firebase:firebase-inappmessaging-display") and see it is fixed. I ran it on an emulator with api 33.
Hey @ronenfe, thank you for the MCVE. I was able to reproduce the issue the memory leak. I'll raise this to our engineers and see what we can do here. Thanks!
You are welcome, it took me a while to pinpoint it to this, it may have conflicts with other included libraries because I think it worked when I removed the rest. Also profiler occasionally doesn't show anything in the list or shows incorrect data due to bugs in that too so it takes an effort to get results there. Now I'm adding my code back part by part and find more leaks for now admob causes leaks too which i try to fix.