CrossGeeks / GoogleClientPlugin

Google Client Plugin for Xamarin iOS and Android
https://www.pujolsluis.com/google-client-plugin-for-xamarin/
MIT License
89 stars 37 forks source link

Plugin.GoogleClient.Shared.GoogleClientBaseException: 10: #58

Closed mihaiim closed 4 years ago

mihaiim commented 4 years ago

Hello!

I created a package and inside it I used GoogleClientPlugin. When I work with the package inside the Sample project where I develop the nugets everything works fine, but when I want to test the packege as a nuget in another project I get this error when I try to log in with google: Exception is: Plugin.GoogleClient.Shared.GoogleClientBaseException: 10: at Plugin.GoogleClient.GoogleClientManager.LoginAsync () [0x000cb] in <9a6ffdce03a64aceaeeebe3956587f25>:0 at [my function]

The solutions I found was to verify the package name or the fingerprint and both of them are ok. If you can see, the exception doesn't help me because the message it's "10:" and I can't find anything about it on google or in issues. If you know why I get this error message please help!

Thanks!

marciosouzajunior commented 4 years ago

I'm having the same problem. I downloaded the sample project to see if the problem was my code, but it presented the same error.

erro_client

marciosouzajunior commented 4 years ago

Hello!

I created a package and inside it I used GoogleClientPlugin. When I work with the package inside the Sample project where I develop the nugets everything works fine, but when I want to test the packege as a nuget in another project I get this error when I try to log in with google: Exception is: Plugin.GoogleClient.Shared.GoogleClientBaseException: 10: at Plugin.GoogleClient.GoogleClientManager.LoginAsync () [0x000cb] in <9a6ffdce03a64aceaeeebe3956587f25>:0 at [my function]

The solutions I found was to verify the package name or the fingerprint and both of them are ok. If you can see, the exception doesn't help me because the message it's "10:" and I can't find anything about it on google or in issues. If you know why I get this error message please help!

Thanks!

Hi! I fixed the error by doing two things:

  1. Add the Android SHA-1 debug key to Firebase. There is one key to debug and other to production:

https://docs.microsoft.com/en-us/xamarin/android/deploy-test/signing/keystore-signature?tabs=windows

You can add these to Firebase:

sha1

  1. If you want to enable server auth code, the type needs be "Web application":

https://developers.google.com/identity/sign-in/android/start-integrating#get_your_backend_servers_oauth_20_client_id