-
Couldn't load subscription status.
- Fork 1.7k
Description
[REQUIRED] Step 1: Describe your environment
- Xcode version: 13.2.1
- Firebase SDK version: FirebaseAuth (8.13.0), FirebaseUI (12.1.1)
- Installation method: CocoaPods
- Firebase Component: Auth
- Target platform(s): iOS
[REQUIRED] Step 2: Describe the problem
I've been following the instructions to add sign-in to my iOS app with FirebaseUI. I've already successfully added Firebase to my Xcode project, as well as added FirebaseUI to my Podfile and installed all the relevant pod dependencies. And lastly, I set up only the Google sign-in method, and added the respective handler for sign-in attempts within my AppDelegate.m. This is the only file where I have added code, so I'm not doing anything anywhere else. The issue is when I run my app, I'm crashing with a somewhat cryptic message [FBLPromise HTTPBody]: unrecognized selector sent to instance. I've seen other people having the same issue but no clear answer to what the solution is. I'm just trying to stand-up a basic view-controller with the Google sign-in option.
Crash dump
2022-03-10 18:03:01.913998-0800 Apartafit[83942:2604121] -[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x600000cf5cb0
2022-03-10 18:03:01.915407-0800 Apartafit[83942:2604121] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x600000cf5cb0'
*** 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 0x000000010a1e9c9c -[GDTCCTUploadOperation updateNextUploadTimeWithResponse:forTarget:] + 76
6 GoogleDataTransport 0x000000010a1e918c __64-[GDTCCTUploadOperation sendURLRequestWithBatch:target:storage:]_block_invoke + 64
7 FBLPromises 2022-03-10 18:03:01.947220-0800 Apartafit[83942:2603744] [Firebase/Crashlytics] Version 8.14.0
0x0000000109a252c0 __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.67 + 80
8 FBLPromises 0x0000000109a249d4 __44-[FBLPromise observeOnQueue:fulfill:reject:]_block_invoke_2 + 88
9 libdispatch.dylib 0x000000010abffe94 _dispatch_call_block_and_release + 24
10 libdispatch.dylib 0x000000010ac01694 _dispatch_client_callout + 16
11 libdispatch.dylib 0x000000010ac08a88 _dispatch_lane_serial_drain + 1300
12 libdispatch.dylib 0x000000010ac09534 _dispatch_lane_invoke + 436
13 libdispatch.dylib 0x000000010ac15664 _dispatch_workloop_worker_thread + 820
14 libsystem_pthread.dylib 0x00000001c99caad4 _pthread_wqthread + 284
15 libsystem_pthread.dylib 0x00000001c99c988c start_wqthread + 8
)
2022-03-10 18:03:01.976093-0800 Apartafit[83942:libc++abi: terminating with uncaught exception of type NSException
Relevant Code:
You can see my repo with all the files I have locally here
Below is what I have added in my AppDelegate.m, where the heavy-lifting is being done in the application:didFinishLaunchingWithOptions: API
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Use Firebase library to configure APIs
[FIRApp configure];
[FIRMessaging messaging].delegate = self;
FUIAuth *authUI = [FUIAuth defaultAuthUI];
// You need to adopt a FUIAuthDelegate protocol to receive callback
authUI.delegate = self;
NSArray<id<FUIAuthProvider>> *providers = @[
[[FUIGoogleAuth alloc] initWithAuthUI:authUI],
];
authUI.providers = providers;
return YES;
}
#pragma mark - FUIAuthDelegate
- (BOOL)application:(UIApplication *)app
openURL:(NSURL *)url
options:(NSDictionary *)options {
NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
return [[FUIAuth defaultAuthUI] handleOpenURL:url sourceApplication:sourceApplication];
}
Thanks in advance for any insights!