firebase-ios-sdk icon indicating copy to clipboard operation
firebase-ios-sdk copied to clipboard

Memory Leak when calling FirebaseApp.configure

Open edys00 opened this issue 2 years ago • 14 comments
trafficstars

Description

When I was investigating memory leak in our App, after eliminating some of potential codes I found that one of the memory leak issues is actually caused by Firebase iOS SDK and it happens after calling FirebaseApp.configure. I attached the screenshot from memory graph debugger, unfortunately there is no useful information from the backtrace but can confirm all the APMP thing is from Firebase SDK. Screen Shot 2023-04-04 at 11 30 01 Screen Shot 2023-04-04 at 11 29 54

Reproducing the issue

Call FirebaseApp.configure on App Launch and turn on Debug Memory Graph after the app finish launching.

Firebase SDK Version

10.2.0

Xcode Version

14.1

Installation Method

Zip

Firebase Product(s)

AB Testing, Analytics, Crashlytics, DynamicLinks, In-App Messaging, Installations, Messaging, Performance, Remote Config

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet

Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet

Replace this line with the contents of your Podfile.lock!

edys00 avatar Apr 04 '23 04:04 edys00

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

google-oss-bot avatar Apr 04 '23 04:04 google-oss-bot

APMP prefixed symbols are from FirebaseAnalytics

paulb777 avatar Apr 04 '23 14:04 paulb777

Can confirm this as well

Xcode 14.3, Firebase SDK 10.6.0

ohserezha avatar Apr 04 '23 16:04 ohserezha

@skuske Instruments is showing the leak in a FirebaseAnalytics module in this report versus a FirebaseSessions module in #11027 - so these are almost certainly different leaks.

paulb777 avatar Apr 07 '23 14:04 paulb777

I'm getting this leak as well. Any news on the fix?

strahinja-mem avatar Apr 16 '23 17:04 strahinja-mem

Thank you for reporting this issue. We have confirmed the issue and are working on a fix. However, the fix requires a number of changes, so it may not be available soon.

The good news is that the memory leak appears to be a fixed amount, i.e. it won't increase over time, so users shouldn't see much of an impact.

tsunghung avatar Apr 17 '23 05:04 tsunghung

thanks for the update @tsunghung.

looking forward to the fix being rolled out when ready.

edys00 avatar Apr 17 '23 15:04 edys00

any news?

Anton-Ivchenko-Axon avatar May 16 '23 13:05 Anton-Ivchenko-Axon

I still have this memory leak

osfunapps avatar May 17 '23 12:05 osfunapps

Sorry about that. Please see the comment.

We have confirmed the issue and are working on a fix. However, the fix requires a number of changes, so it may not be available soon. The good news is that the memory leak appears to be a fixed amount, i.e. it won't increase over time, so users shouldn't see much of an impact.

tsunghung avatar May 17 '23 15:05 tsunghung

We see an impact on initial load. Any updates?

image

Appzelof avatar Aug 29 '23 12:08 Appzelof

Any updates on the fix even iam facing the issue

Invader1999 avatar Nov 23 '23 07:11 Invader1999

We are also seeing this.

jotai-coder avatar Feb 13 '24 22:02 jotai-coder

We are facing the same issue for the past six months, any updates ?

Ilyeesz avatar Feb 17 '24 14:02 Ilyeesz

Sorry for the long wait. The fix will be available in the next release in early March.

tsunghung avatar Feb 19 '24 18:02 tsunghung

Sorry again for the long wait. The fix is now available in the Firebase 10.22.0 release.

andrewheard avatar Mar 04 '24 20:03 andrewheard

noted, thanks for the assistance @paulb777 @tsunghung @andrewheard !

edys00 avatar Mar 16 '24 16:03 edys00