google / promises

Promises is a modern framework that provides a synchronization construct for Swift and Objective-C.
Apache License 2.0
3.8k stars 295 forks source link

FBLPromises crashing #183

Open mmdock opened 2 years ago

mmdock commented 2 years ago

hi! my project uses this project as a sub dependency via FirebaseCrashlytics, FirebaseInstallations, GoogleDataTransport, and GoogleUtilities/Environment.

Recently, we have been experiencing a crash when launching our application on observeOnQueue call. 6 GoogleDataTransport 0x10e24f0ca -[GDTCCTUploadOperation uploaderSessionCreateIfNeeded] + 58 (GDTCCTUploadOperation.m:105) 7 GoogleDataTransport 0x10e251705 56-[GDTCCTUploadOperation sendURLRequestWithBatch:target:]_block_invoke.110 + 69 (GDTCCTUploadOperation.m:269) 8 FBLPromises 0x10d1592f5 56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.67 + 85 (FBLPromise.m:273) 9 FBLPromises 0x10d1588da __44-[FBLPromise observeOnQueue:fulfill:reject:]_block_invoke_2 + 106 (FBLPromise.m:227)

I honestly wasn't sure if I need to report it here, or to one of the libraries that use this as a sub-dependency. log.txt

vladimir-zivanov-htec commented 2 years ago

any updates on this? we are facing the same issue, but only on the iOS version less than 13. @mmdock

ykjchen commented 2 years ago

Looking at the stack trace I see:

Last Exception Backtrace:\
0   CoreFoundation                      0x7fff20406d34 __exceptionPreprocess + 226\
1   libobjc.A.dylib                     0x7fff201a4a65 objc_exception_throw + 48\
2   CoreFoundation                      0x7fff20487f47 _CFThrowFormattedException + 200\
3   CoreFoundation                      0x7fff20485bd8 -[__NSArrayM insertObject:atIndex:].cold.2 + 0\
4   CoreFoundation                      0x7fff203005de -[__NSArrayM insertObject:atIndex:] + 991\
5   DBDebugToolkit                         0x10da3859d +[NSURLSessionConfiguration(DBURLProtocol) db_defaultSessionConfiguration] + 173 (NSURLSessionConfiguration+DBURLProtocol.m:45)\
6   GoogleDataTransport                    0x10e24f0ca -[GDTCCTUploadOperation uploaderSessionCreateIfNeeded] + 58 (GDTCCTUploadOperation.m:105)\
7   GoogleDataTransport                    0x10e251705 __56-[GDTCCTUploadOperation sendURLRequestWithBatch:target:]_block_invoke.110 + 69 (GDTCCTUploadOperation.m:269)\
8   FBLPromises                            0x10d1592f5 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.67 + 85 

That indicates that the +[NSURLSessionConfiguration db_defaultSessionConfiguration] is triggering the crash, but as far as I can tell, -[GDTCCTUploadOperation uploaderSessionCreateIfNeeded] doesn't call +[NSURLSessionConfiguration db_defaultSessionConfiguration]. Rather it calls +defaultSessionConfiguration: https://github.com/google/GoogleDataTransport/blob/3615a4ca10961d82ed2b5459cd9a5cb5ebc03ff2/GoogleDataTransport/GDTCCTLibrary/GDTCCTUploadOperation.m

Any idea why DBDebugToolkit is involved here?