Skip to content

Memory leak in FirebaseInAppMessagingDisplay #6919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ronenfe opened this issue Apr 29, 2025 · 6 comments
Open

Memory leak in FirebaseInAppMessagingDisplay #6919

ronenfe opened this issue Apr 29, 2025 · 6 comments
Labels
api: inappmessaging type: bug Something isn't working

Comments

@ronenfe
Copy link

ronenfe commented Apr 29, 2025

[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:

#482

@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@lehcar09
Copy link
Contributor

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 (#5076 (comment)) and check the findings mentioned in this comment #5076 (comment), 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?

@ronenfe
Copy link
Author

ronenfe commented Apr 29, 2025

Hi, i use the same bom version. Let me try it on a sample project.

@ronenfe
Copy link
Author

ronenfe commented Apr 29, 2025

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.

@lehcar09
Copy link
Contributor

lehcar09 commented May 1, 2025

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!

@ronenfe
Copy link
Author

ronenfe commented May 1, 2025

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.

@lehcar09 lehcar09 added the type: bug Something isn't working label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: inappmessaging type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants