CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

Fatal Error in plugin.swift:65

Open kuerbi opened this issue 3 years ago • 4 comments

When i run the app in an iPhone Emulator i get the following error message after calling "await GoogleAuth.signIn();"

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

kuerbi avatar Jul 15 '22 09:07 kuerbi

I'm having the same issue.

Also in the file "Plugin.swift", I'm getting alot of errors, the majority of which are related to GoogleSignIn.

Some error examples I get:

  • Value of type 'GoogleAuth' has no member 'resolveSignInCallWith';
  • Cannot find 'user' in scope;
  • @\objc can only be used with members of classes, @\objc protocols, and concrete extensions of classes;
  • Cannot find 'self' in scope;
  • Cannot find 'getConfigValue' in scope;
  • Cannot find 'signInCall' in scope;
  • Extraneous '}' at top level.

Note: I didn't change nor modify this file directly since I don't know swift language.

Dev-it-a-dev avatar Jul 20 '22 13:07 Dev-it-a-dev

Same here

kakokvantaliani avatar Jul 26 '22 09:07 kakokvantaliani

+1

NareshMedipally avatar Jul 27 '22 11:07 NareshMedipally

When i run the app in an iPhone Emulator i get the following error message after calling "await GoogleAuth.signIn();"

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

In my case problem was fixed by adding clientId in capacitor.config.ts . const config: CapacitorConfig = { ... plugins: { GoogleAuth: { ... serverClientId: [YOUR SERVER CLIENT ID], clientId: [YOUR IOS CLIENT ID], androidClientId: [YOUR ANDROID CLIENT ID] ... } } };

Make sure to add androidClientId as well, otherwise google login won't work on android

berekashvili22 avatar Aug 01 '22 09:08 berekashvili22