'Firebase SDK crashes on FBLPromise with unrecognized selector
I've followed the Firebase docs for integrating my iOS app with Google Sign-in authentication, and now that I have the "sign-in with google" button showing up it crashes immediately with this [FBLPromise HTTPBody]: unrecognized selector sent to instance. I've found other threads where people had the same issue [1, 2] but there isn't a lot of useful information out there. Some people believe it has to do with the Podfile, below I'm attaching the crash dump as well as my Podfile content. Thanks in advance for any help!
Podfile
# platform :ios, '9.0'
target 'ApartaFitPlayground' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for ApartaFitPlayground
pod 'MaterialComponents'
pod 'FirebaseUI'
end
Crash dump
2022-02-21 17:42:41.609421-0800 ApartaFitPlayground[10860:1538705] -[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x60000207bb40
2022-02-21 17:42:41.611388-0800 ApartaFitPlayground[10860:1538705] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x60000207bb40'
*** First throw call stack:
(
0 CoreFoundation 0x00000001803e1188 __exceptionPreprocess + 236
1 libobjc.A.dylib 0x0000000180193384 objc_exception_throw + 56
2 CoreFoundation 0x00000001803f0530 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 CoreFoundation 0x00000001803e53fc ___forwarding___ + 1408
4 CoreFoundation 0x00000001803e743c _CF_forwarding_prep_0 + 92
5 GoogleDataTransport 0x000000010578dc5c -[GDTCCTUploadOperation updateNextUploadTimeWithResponse:forTarget:] + 76
6 GoogleDataTransport 0x000000010578d14c __64-[GDTCCTUploadOperation sendURLRequestWithBatch:target:storage:]_block_invoke + 64
7 FBLPromises 0x0000000104fc92c0 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.67 + 80
8 FBLPromises 0x0000000104fc89d4 __44-[FBLPromise observeOnQueue:fulfill:reject:]_block_invoke_2 + 88
9 libdispatch.dylib 0x00000001061a3e94 _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x00000001061a5694 _dispatch_client_callout + 16
11 libdispatch.dylib 0x00000001061aca88 _dispatch_lane_serial_drain + 1300
12 libdispatch.dylib 0x00000001061ad534 _dispatch_lane_invoke + 436
13 libdispatch.dylib 0x00000001061b9664 _dispatch_workloop_worker_thread + 820
14 libsystem_pthread.dylib 0x00000001c99caad4 _pthread_wqthread + 284
15 libsystem_pthread.dylib 0x00000001c99c988c start_wqthread + 8
)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/luisdelgado/Library/Developer/Xcode/DerivedData/ApartaFitPlayground-eamkhaawlsqbqnclyjwxadvzaxpd/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/luisdelgado/Library/Developer/Xcode/DerivedData/ApartaFitPlayground-eamkhaawlsqbqnclyjwxadvzaxpd/Build/Products/Debug-iphonesimulator:/Users/luisdelgado/Library/Developer/Xcode/DerivedData/ApartaFitPlayground-eamkhaawlsqbqnclyjwxadvzaxpd/Build/Products/Debug-iphonesimulator/PackageFrameworks
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x60000207bb40'
terminating with uncaught exception of type NSException
CoreSimulator 783.5 - Device: iPhone 12 Pro Max (EAEF114F-D624-40EB-831C-40ADDD5966D9) - Runtime: iOS 15.2 (19C51) - DeviceType: iPhone 12 Pro Max
Solution 1:[1]
Add platform :ios, '10.0' and run pod update.
Recent versions of Firebase require at least iOS 10. If there are still problems, see the suggestions at https://github.com/firebase/firebase-ios-sdk/issues/7939
Solution 2:[2]
Find your .debug file then find OTHER_LDFLAGS and comment out all of the framework files, that worked for me:
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"icucore" -l"sqlite3" -l"z" -framework "CFNetwork" -framework "CoreTelephony" //-framework "FBLPromises" -framework "FirebaseAnalytics" -framework "FirebaseAuth" -framework "FirebaseCore" -framework "FirebaseCoreDiagnostics" -framework "FirebaseDatabase" -framework "FirebaseInstallations" -framework "Foundation" -framework "GTMSessionFetcher" -framework "GoogleAppMeasurement" -framework "GoogleAppMeasurementIdentitySupport" -framework "GoogleDataTransport" -framework "GoogleUtilities" -framework "SafariServices" -framework "Security" -framework "StoreKit" -framework "SystemConfiguration" -framework "UIKit" -framework "leveldb" -framework "nanopb"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Paul Beusterien |
| Solution 2 | Jeremy Caney |
