CapacitorGoogleAuth: iOS M1 Mac/Tablets Fails to Initialize

I am getting this error when trigger GoogleAuth.signOut()

CodetrixStudioCapacitorGoogleAuth/Plugin.swift:121: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

@objc
    func signOut(_ call: CAPPluginCall) {
        DispatchQueue.main.async {
            self.googleSignIn.signOut();
        }
        call.resolve();
    }
  • capacitor version 6.0.0
  • plugin version 3.4.0 rc.4

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

I also get this error running Angular 18, Ionic 8 and Capacitor 6. The Google Auth worked great until I upgraded Angular and Ionic. Now I get the error:

CodetrixStudioCapacitorGoogleAuth/Plugin.swift:74: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

Any updates on this?

Great catch @ivarsmednis ! I forgot that I had done that as well…

I have just found the following solution:

await GoogleAuth.initialize({}); await GoogleAuth.signIn();

await GoogleAuth.initialize({}); await GoogleAuth.signOut();

I need to call these two always together.