Skip to content

Crash on silent push notification (Firebase Auth) #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gelosi opened this issue Jul 10, 2018 · 4 comments
Closed

Crash on silent push notification (Firebase Auth) #123

gelosi opened this issue Jul 10, 2018 · 4 comments

Comments

@gelosi
Copy link

gelosi commented Jul 10, 2018

Using

Firebase 5.0.2 for iOS
FirebaseAuth
FirebaseUI/Auth
FirebaseUI/Phone

    FUIAuth *authUI = [FUIAuth defaultAuthUI];
    authUI.signInWithEmailHidden = YES;
    authUI.delegate = self;
    
    FUIPhoneAuth *provider= [[FUIPhoneAuth alloc] initWithAuthUI:authUI];
    authUI.providers = @[provider];
    [provider signInWithPresentingViewController:vc phoneNumber:mobileNumber];

Getting crashed (right after typing in phone number and taping 'Verify')

I understand it can be wrong use of GTMSessionFetcher in the Firebase Auth code, but also, crash happens inside this code: GTMSessionFetcherService fetcherDidBeginFetching:

Maybe you can suggest at least correct configuration for session fetcher to work properly?

Fatal Exception: NSInvalidArgumentException-[GTMSessionFetcher setFetcher:forTask:]: unrecognized selector sent to instance 0x10e429360 Raw Text
--
0 | CoreFoundation | __exceptionPreprocess
4 | CoreFoundation | _CF_forwarding_prep_0
5 | GTMSessionFetcher | GTMSessionFetcherService.m line 441-[GTMSessionFetcherService fetcherDidBeginFetching:]
6 | GTMSessionFetcher | GTMSessionFetcher.m line 894-[GTMSessionFetcher beginFetchMayDelay:mayAuthorize:]
7 | - | FIRAuthBackend.m line 545-[FIRAuthBackendRPCIssuerImplementation asyncPostToURLWithRequestConfiguration:URL:body:contentType:completionHandler:]
8 | - | FIRAuthBackend.m line 809-[FIRAuthBackendRPCImplementation postWithRequest:response:callback:]
9 | - | FIRAuthBackend.m line 701-[FIRAuthBackendRPCImplementation sendVerificationCode:callback:]
10 | - | FIRAuthBackend.m line 469+[FIRAuthBackend sendVerificationCode:callback:]
11 | - | FIRPhoneAuthProvider.m line 401__110-[FIRPhoneAuthProvider verifyClientAndSendVerificationCodeToPhoneNumber:retryOnInvalidAppCredential:callback:]_block_invoke.205
12 | - | FIRPhoneAuthProvider.m line 410-[FIRPhoneAuthProvider verifyClientWithCompletion:]
13 | - | FIRPhoneAuthProvider.m line 402-[FIRPhoneAuthProvider verifyClientAndSendVerificationCodeToPhoneNumber:retryOnInvalidAppCredential:callback:]
14 | - | FIRPhoneAuthProvider.m line 340__61-[FIRPhoneAuthProvider internalVerifyPhoneNumber:completion:]_block_invoke
15 | - | FIRAuthNotificationManager.m line 173-[FIRAuthNotificationManager callBack]
16 | - | FIRAuthNotificationManager.m line 146-[FIRAuthNotificationManager canHandleNotification:]
17 | - | FIRAuth.m line 1412__33-[FIRAuth canHandleNotification:]_block_invoke

@thomasvl
Copy link
Member

Have you opened a bug on firebase also? I've seen a few references to issues with the way firebase is trying to allow session reused within the fetcher, and I wonder if this is related. They likely will know more about what is snippet is doing to help sort out what might be happening here.

@gelosi
Copy link
Author

gelosi commented Jul 11, 2018

Sounds reasonable. I will add issue to the firebase page as well. Thing is (as stated in theirs "open issue guidelines") they kindly asking to not post issues for code which is not in their repo - Technically, GTMSF is a dependency.

@thomasvl
Copy link
Member

Understood, but without more info about what they are doing with the session fetcher, it is sorta hard to tell where things are going wrong. The crash is happening on a delegate not implementing a selector, so it could actually be directly related to their code.

@gelosi
Copy link
Author

gelosi commented Jul 11, 2018

Yepp, lets's see.
Added one here: firebase/FirebaseUI-iOS#476

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants