-
Notifications
You must be signed in to change notification settings - Fork 258
Sign out first then sign in causes android app crash. #68
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
Comments
Is this the error you're getting?
I'm also seeing something similar on iOS. |
Also, would you be able to provide your complete workaround? Thanks!
|
Hi, sorry for the late reply. It's quite a long time ago I fixed this myself so I'm not sure if the error message is same as yours, but yeah, I can share the workaround. So as I noted, the problem is that when you sign out first then try sign in, 'theConfiguration' variable in GoogleSignIn.cs class becomes null and causes error. So you need to edit GoogleSignInImpl.cs first. Extract constructor logic of GoogleSignInImpl class to a method :
then you can use my modified GoogleSignIn.cs code above, I think. :) |
Thanks @GarlicDipping! That seems to have fixed my error on both iOS and Android. I did have to add But then things seemed to work perfectly. This definitely appears to be a bit of a bug, so hopefully it gets fixed at some point. |
@GarlicDipping - Thank you so much for posting your solution! It worked perfectly for me, too! |
Thanks you alot |
@GarlicDipping Thanks a lot mate, I still cannot believe that it has not been added to the master branch. To make it simple for other people to understand, I will add both scripts here.
https://gist.github.com/bhupiister/72f894df9ff6ad03ac7dfa0ebfcb8d20
https://gist.github.com/bhupiister/c329c33ae6a217f34193728d93a3e7d9 |
@bhupiister links don't work :) Thanks guys! |
This is a bit old, but for me it is still relevant.
|
Thanks, its ok, but after i was logged in and sign out, then sign in again. It logged in Silently, without account choosing, but next signout and sign in are okay |
@Hugo-Pereira I have the same issues, can you help us? thank you |
Sorry, I'm no longer using this plugin. |
Use global::googleinstance.signout (with global)
But anyway its not working when u restarted app, and signing out for the
first time
…On Mon, Sep 19, 2022, 09:49 Felix Cary Giovanni ***@***.***> wrote:
Thanks, its ok, but after i was logged in and sign out, then sign in
again. It logged in Silently, without account choosing, but next signout
and sign in are okay Why?
@Hugo-Pereira <https://github.com/Hugo-Pereira> I have the same issues,
can you help us? thank you
—
Reply to this email directly, view it on GitHub
<#68 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD5WG5DJC6E257TV2WMLSKTV7AEIRANCNFSM4F7U5FPQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It'll solve the problem, too |
best answer |
From the sample code, it seems like when I sign out first, theConfiguration becomes null and when I sign in after, it stays null and causes app crash.
So I've wrapped and exposed GoogleSignIn_Configure method in GoogleSignInImpl class, and when configuration changes, call it and problem gone.
I took a quick look at native code and seems like it would cause not much problem(anyway it keeps calling CallConfigure() on every signin-out action), But I'd like to double check if It't ok to do.
Here's code for my modified Configuration accessor in GoogleSignIn.cs :
The text was updated successfully, but these errors were encountered: