facebook-ios-sdk
facebook-ios-sdk copied to clipboard
12.2.1 Memory Leak
Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing GitHub issues
- [X] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [X] I've read the Code of Conduct
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
13.2
Facebook iOS SDK version
12.2.1
Dependency Manager
CocoaPods
SDK Framework
Login
Goals
I have updated login and share pods to 12.2.1 and memory leaked occurred when i have checked from instruments. After i have disabled code ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions) in AppDelegate, it has gone. It is caused by the FB SDK.
Expected results
Issues happened by FB SDK, needs to be corrected asap.
Actual results
Steps to reproduce
No response
Code samples & details
No response
Does this only happen when you open from a web browser? Also, are you able to provide a sample app to reproduce this?
I'm getting this same memory leak issue as well on 12.2.1. Noticed when running Instruments in Xcode.
Instruments specifically calls out these areas: FBSDKErrorConfiguration FBSDKErrorRecoveryConfiguration FBSDKServerConfiguration
What is a bug
@Sunrise17 We were able to reproduce a memory leak from the authentication token factory class and have created a possible fix for this issue that we expect to ship in our next release. We will leave this issue open until that release and hope that you'll be able to confirm that it is fixed at that time.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
I would like for this to be re-opened - the issue is still here and is reproducible.
Tested on iOS 16, iPhone 14 emulator.
I have downloaded the latest (at the time of writing) swift package facebook-ios-sdk: 15.1.0.
The module which is imported in app is Facebook Login.
Run the "Instruments->Leaks" on an empty Swift project - no leaks. But do what OP has said and we immediately get 23 memory leaks:

We are still facing the same issue, please let us know if there is any update regarding this.