baumblatt / capacitor-firebase-auth

Capacitor Firebase Authentication Plugin
MIT License
261 stars 129 forks source link

Occasional silent failure with Google on Android #46

Closed charlesj1 closed 4 years ago

charlesj1 commented 4 years ago

I had a silent failure where I tried to sign in with google on android, and the plugin call didn't start the authentication flow and didn't return a success or failure.

Usually it works fine, and unfortunately I can't reproduce the issue. But looking through the code, should handleOnActivityResult in GoogleProviderHandler.java have a plugin.handleFailure in the event that account==null? I'm not sure if this ever arises, but if it did, that would be one explanation for how my silent failure could have occurred.

baumblatt commented 4 years ago

Hi Charles,

Sorry about the issue, but I don’t think that this is the case. If the account was null the function will fallback in the handleFailure call on line 103 outside the try.

Please, if you have any new information on this, let me know.

Just in case, something that I always had caution about is block two parallels calls to the plugin, this is needed because the way Capacitor handle the Saved Call to return.

Best regards, Bernardo Baumblatt.

charlesj1 commented 4 years ago

Hi Bernado

Thanks for your response. Yes, I completely missed that you had a backup handleFailure on line 103, so clearly my hypothesis was incorrect.

Thanks for the tip about having two parallel calls to the plugin. I don't think this can be the case in my app but I'll bear that in mind.

I'll close this issue since I don't have enough information to be helpful. I couldn't see any other way in your code for something to go wrong, so I'll just say it's one of life's mysteries.

Cheers Charles