-
Notifications
You must be signed in to change notification settings - Fork 158
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
Crash on iOS #387
Comments
Using the repo latest code, ie later than RC4 but don't know if different, I was able to get Google sign in to work under Capacitor 6 on an iPhone on iOS 17.6. Do you need to add await in front of your calls? If you are in an app, then miss out the initialize() parameters? In my Android and iOS app I simply have this with no await: If I restart my app and the login has been saved, then initialize won't have been called, so to log out I do this with await
|
I don't think the problem is missing Either way, something like this shouldn't cause a full app crash anyway, it should just be a rejected Promise at worst. |
I'm facing the same issue on android the catlog is giving init error `user: User | null = null; constructor() { } } |
Seems like the backtrace points to this line in GoogleSignIn iOS package: https://github.com/google/GoogleSignIn-iOS/blob/6.2.4/GoogleSignIn/Sources/GIDSignIn.m#L529 which throws with error The iOS package already has new major version, btw, but I'm not sure if upgrading that could help. |
same problem, i downgraded to rc.v2. For IOS works but not for Android, the opposite as v4. Update: i deleted the plugin and reinstalled last version |
@davidepoletti21 - I agree - this bug is super weird - can you confirm which version you have now that you "reinstalled last version" - do you mean you're on 3.3.6 and not one of the release candidates and it's working for you? |
that's the problem. I did npm install "CodetrixStudio/CapacitorGoogleAuth and if i check the version with npm list it says 3.4.0-rc.4. |
@davidepoletti21 @panstromek |
@jhenriquez07 no i'm still getting the problem. Even if on my device is working i'm receiving many feedback about crash on IOS with google sign-in. Apple review also rejected my last build because of that |
@jhenriquez07 @davidepoletti21 I believe you should call the |
thanks. that's it now ios and android works fine |
In my case, the crash seems to go away when I remove clientId from the initialize call (based on this comment #378 (comment)): GoogleAuth.initialize({
// clientId: '...',
grantOfflineAccess: false,
}); The problem seems to be that this clientId (in my case) was not the correct clientId for iOS. I'll see if this fixes the issue for other users and works for all platforms when I release a new version of the app. Either way - the crash is definitely a problem. The plugin should catch the exception thrown by the Google Auth library and reject the promise with the error message instead. |
I made a PR to update the doc for v6. |
Version of the plugin: RC4
code:
capacitor.config.ts entry
I got the exception from test flight reports.
This points to this line in the code:
CapacitorGoogleAuth/ios/Plugin/Plugin.swift
Line 85 in e808d9e
Seems like it could be null pointer exception? I don't know enough about Swift to tell.
The text was updated successfully, but these errors were encountered: