device: Android 5.1
starting activity like this:
startActivityForResult(AuthUI.getInstance()
.createSignInIntentBuilder()
.setProviders(Arrays.asList(new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()))
.setTosUrl("https://mytestsite/terms-of-service.html")
.build(), REQUESTCODE_LOGIN);
When I start the sign-in activity, I can see the account selection pop-up. When I select any of the google account to sign-in, the activity returns with result code '0' (RESULT_CANCELED). If I use any non-google account, then sign-in gets complete successfully. In firebase console, Google authentication is enabled, and I did login with with gmail account in the past.
In my android console, I see the following debug lines:
V/FA: Recording user engagement, ms: 5031
D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=5031, _sc=MainActivity, _si=-4492839841470160947}]
V/FA: onActivityCreated
D/AutoManageHelper: starting AutoManage for client 1 false false
D/AutoManageHelper: onStart true {1=com.google.android.gms.internal.zzzt$zza@27a3fd6a}
V/FA: Activity paused, time: 495093
V/FA: Activity resumed, time: 495194
W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
W/khrn_client: init_window window 0x53567368, 552x270 hintTransform 0x0 do_pre 1
W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
W/khrn_client: init_window window 0x536e1818, 480x800 hintTransform 0x0 do_pre 1
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@3bae1e3 time:495331
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 278
V/FA: Activity paused, time: 495472
V/FA: Activity resumed, time: 499120
D/AutoManageHelper: starting AutoManage for client 0 true false
D/AutoManageHelper: connecting com.google.android.gms.internal.zzaal@266e951
I/Timeline: Timeline: Activity_launch_request id:com.logithreads.oorjaclient time:499136
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 36
V/FA: Activity paused, time: 499154
V/FA: onActivityCreated
V/FA: Activity resumed, time: 499192
W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
W/khrn_client: init_window window 0x528956a8, 480x800 hintTransform 0x0 do_pre 1
V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 60
V/FA: Activity paused, time: 499252
E/GoogleProvider: Error logging in with Google. 10 null
V/FA: Activity resumed, time: 500060
W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
W/khrn_client: init_window window 0x536d4360, 480x800 hintTransform 0x0 do_pre 1
W/khrn_client: init_window num_buffers 3 min undequeued buffers 1
W/khrn_client: init_window window 0x53b3c6f8, 576x494 hintTransform 0x0 do_pre 1
I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@13556b3 time:500194
V/FA: Inactivity, disconnecting from the service
V/FA: Recording user engagement, ms: 59329
V/FA: Using measurement service
V/FA: Connecting to remote service
V/FA: Activity paused, time: 559387
D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=59329, _sc=MainActivity, _si=-4492839841470160947}]
V/FA: Using measurement service
V/FA: Connection attempt already in progress
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
V/FA: Inactivity, disconnecting from the service
@rave1502 have you entered the SHA1 of your signing key in the Firebase console? From your logs it's hard to guess what's happening but the only way that Google differs from the other sign in methods is that it verifies your SHA1.
Yes, SHA1 was entered. The difference I could see was
** somehow I am suspecting it to be multidex issue. I got multidex error on my new laptop(for the same code), then I had to set "multidex = true" in my build.gradle file. I think I need to do little bit more than this to support multidex on api version 16.
@rave1502 99.9% sure it's #1: this issue is occuring on debugs builds, right? Every android studio installation creates a different debug key so you'll have to regenerate it.
@rave1502 when you change laptops your debug key ($HOME/.android/debug.keystore) has changed, which means the SHA1 has changed. So you'll need to run the keytool command again to get the SHA1 and enter it in the Firebase console.
With the same SHA1 settings on server, created a new android project on my new laptop and it is working fine, but old project is still not working.
@rave1502 while I am not completely sure what "same SHA1 settings is" I am going to close this issue because it's clear that the issue is SHA1 configuration of your project (as you said, the new project works fine).
If you still can't get things working, you can reach out to our personalized support service who can troubleshoot your issue.
Hello, have you considered adding a better error message for this sort of thing instead of E/GoogleProvider: Error logging in with Google. 10 null?
We're getting the same thing, and this is completely not obvious.
Maybe something like,
"your SHA-1 has changed, please update it in the Firebase Console"
or something otherwise humanly readable
thanks
Agree with Zhuinden, Firebase is a technical nightmare to work with, the error messages are not very helpful at all. routinely getting 12501 and now 10 sometimes
I am actually facing the same issue .
OMG finaly I solved it, so I created SHA1 as per documention, but I run my app in debug mode (Build variant) and always had resultCode=0. Just switched to release mode and problem is gone, now resultCode=-1 as expected.
When I run my app it shows the same error that it disconnects from the service.
I fed the SHA-1 code,initially into he firebase should I regenerate it.
(Note: I am using php as well in my project)
Most helpful comment
Hello, have you considered adding a better error message for this sort of thing instead of
E/GoogleProvider: Error logging in with Google. 10 null?We're getting the same thing, and this is completely not obvious.
Maybe something like,
"your SHA-1 has changed, please update it in the Firebase Console"
or something otherwise humanly readable
thanks