Configure Firebase and run app in Instruments, it will show many leaks related to NSURLSession. These sessions need to be invalidated to free all resources they are holding to, placing calls to [session finishTasksAndInvalidate]; before returning from functions that create NSURLSession, seems to fix the issue.
[FIRApp configure];
I also have same issue.


The initial fix failed some tests. Reopening to continue the investigation.
This is still occurring in the latest version.
From pod install:
Using Firebase (5.11.0)
Using FirebaseAnalytics (5.3.0)
Using FirebaseCore (5.1.6)
Using FirebaseInstanceID (3.3.0)
Using GoogleAppMeasurement (5.3.0)
Using GoogleUtilities (5.3.4)

@morganchen12 @agordeev please reopen
@RamblinWreck77 can you share your project? I haven't been able to repro.
@morganchen12 I have the same issue with lots of memory leaks generated by Firebase. I am attaching the screenshot.

Here is my setup:
Using Firebase (5.11.0)
Using FirebaseAnalytics (5.3.0)
Using FirebaseAnalyticsInterop (1.1.0)
Using FirebaseAuth (5.0.4)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (5.1.6)
Using FirebaseDynamicLinks (3.1.1)
Using FirebaseFunctions (2.1.1)
Using FirebaseInstanceID (3.3.0)
Using FirebaseUI (5.2.2)
Using GTMSessionFetcher (1.2.0)
Using GoogleAppMeasurement (5.3.0)
Using GoogleUtilities (5.3.4)
I would be happy to share my project with you as long as there is some secure way of doing this.
Thanks @AndriyGo, I'll take a look.
@morganchen12 in case it may be helpful here are the results after updating to latest pods:

Setup:
Using Firebase (5.12.0)
Using FirebaseAnalytics (5.3.0)
Using FirebaseAnalyticsInterop (1.1.0)
Using FirebaseAuth (5.0.5)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (5.1.7)
Using FirebaseDynamicLinks (3.1.1)
Using FirebaseFunctions (2.1.1)
Using FirebaseInstanceID (3.3.0)
Using FirebaseUI (5.2.2)
Using GTMSessionFetcher (1.2.0)
Using GoogleAppMeasurement (5.3.0)
Using GoogleUtilities (5.3.4)
@morganchen12 the leaks are still there after latest releases (and #2061 fix)

Setup:
Using Firebase (5.12.0)
Using FirebaseAnalytics (5.3.0)
Using FirebaseAnalyticsInterop (1.1.0)
Using FirebaseAuth (5.0.5)
Using FirebaseAuthInterop (1.0.0)
Using FirebaseCore (5.1.7)
Using FirebaseDynamicLinks (3.1.1)
Using FirebaseFunctions (2.1.1)
Using FirebaseInstanceID (3.3.0)
Using FirebaseUI (5.2.2)
Using GTMSessionFetcher (1.2.0)
Using GoogleAppMeasurement (5.3.0)
Using GoogleUtilities (5.3.6)
@AndriyGo can confirm, I'm seeing these as well
I was previously able to reproduce this by just logging a bunch of Analytics events, but the last patch made those go away. How are you two reproducing this issue?
@morganchen12
I can't reproduce it now. Don't know what has changed. If it resurfaces I will let you know how it can be reproduced.
Thanks @AndriyGo. I'll close this issue for now, but please comment if it resurfaces again.
Hi, Even I'm also getting the same leak in firebase config
import Firebase & FIRApp.configure() in didFinishLaunchingWithOptions in app delegate.


If I remove the import FIRApp.configure(), it's fine.
I'm using firebase version:
Using Firebase (5.10.0)
Using FirebaseAnalytics (5.2.0)
Using FirebaseAnalyticsInterop (1.1.0)
Using FirebaseCore (5.1.5)
Using FirebaseDynamicLinks (3.1.0)
Using FirebaseInstanceID (3.2.2)
Using FirebaseMessaging (3.2.0)
Using GoogleUtilities (5.3.4)
@Manidevlop Please upgrade to Firebase 6.x
Okay, I will upgrade and check it.
Thank you
Most helpful comment
@morganchen12 I have the same issue with lots of memory leaks generated by Firebase. I am attaching the screenshot.
Here is my setup:
I would be happy to share my project with you as long as there is some secure way of doing this.