Google SignIn Button crashes app when clicked on

323 Views Asked by At

I currently implement Google SignIn in my application. Today I received a notification from Crashlytics saying that the app had crashed during the sign in. A user also wrote in saying that they experienced the crash when they clicked on the actual "Sign in with Google" GIDSignInButton. They are from abroad so cannot debug from their device.

Now I have tried to replicate this many times and cannot seem to succeed. It works completely fine for me and others I asked.

The crash log from Crashlytics is:

#0. Crashed: com.apple.main-thread
0  ...                          0x10018b3f0 specialized AppDelegate.signIn(GIDSignIn!, didSignInForUser : GIDGoogleUser!, withError : NSError!) -> () (AppDelegate.swift:313)
1  ...                          0x10018364c @objc AppDelegate.signIn(GIDSignIn!, didSignInForUser : GIDGoogleUser!, withError : NSError!) -> () (AppDelegate.swift)
2  ...                          0x1002e0e10 __37-[GIDSignIn addCallDelegateCallback:]_block_invoke (GIDSignIn.m:1265)
3  ...                          0x1002d8fb8 -[GIDCallbackQueue fire] (GIDCallbackQueue.m:81)
4  ...                          0x1002e09dc __38-[GIDSignIn addDecodeIdTokenCallback:]_block_invoke_2 (GIDSignIn.m:1236)
5  GTMSessionFetcher              0x1007cf864 __71-[GTMSessionFetcher invokeFetchCallbacksOnCallbackQueueWithData:error:]_block_invoke (GTMSessionFetcher.m:2336)
6  libdispatch.dylib              0x187ed21fc _dispatch_call_block_and_release + 24
7  libdispatch.dylib              0x187ed21bc _dispatch_client_callout + 16
8  libdispatch.dylib              0x187ed6b2c _dispatch_main_queue_callback_4CF + 428
9  CoreFoundation                 0x188ff6810 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
10 CoreFoundation                 0x188ff43fc __CFRunLoopRun + 1660
11 CoreFoundation                 0x188f222b8 CFRunLoopRunSpecific + 444
12 GraphicsServices               0x18a9d6198 GSEventRunModal + 180
13 UIKit                          0x18ef697fc -[UIApplication _run] + 684
14 UIKit                          0x18ef64534 UIApplicationMain + 208
15 ...                          0x100084eac main (....swift:65)
16 libdispatch.dylib              0x187f055b8 (Missing)

I know it references two lines in the code but the second one the line does not even exist. The line on AppDelegate 313 does have the user.serverAuthCode. I am wondering if it crashes because this might become nil but then it would say that wouldn't it?

I was wondering if someone could help me debug this and try to figure out the cause of the crash?

0

There are 0 best solutions below