Google-signin: GoogleSignin.signIn() never returns/resolves

Created on 8 Aug 2018  路  33Comments  路  Source: react-native-google-signin/google-signin

No promise is resolved (neither rejected) after picking user from the user list.

Steps to Reproduce

  • Click Google Sign in button
  • User picker comes up (or doesn't come up after the second try)
  • Pick a user

Link to a GitHub repository with code that reproduces the bug: https://github.com/zbettenbuk/jitsi-meet/tree/google-auth
(The code is in react/features/recording/components/LiveStream/GoogleSignInForm.native.js, webClientId and google-services.json are excluded)

Documentation is here: https://github.com/zbettenbuk/jitsi-meet/tree/google-auth/doc

Accessing the Google Sign in feature: Start a conference (enter any name in the top field), then "..." menu -> Start live stream

Expected Behavior

Currently only logging of the successful sign in is expected

Actual Behavior

User picker screen disappears and the GoogleSignin.signIn() promise never gets resolved (neither rejected). If I click the Sign in button again, the promise gets rejected with Error: cannot set promise - some async operation is still in progress

There is an exception in the log though:

Could not set socket write timeout: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (040700-189987672):13)
Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
    at libcore.io.Linux.setsockoptTimeval(Native Method)
    at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:175)
Could not set socket write timeout: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (040700-189987672):13)
Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor)
    at libcore.io.Linux.setsockoptTimeval(Native Method)
    at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:175)

Environment

Please provide the version of your

  • react-native 0.55.4
  • react-native-google-signin 1.0.0-rc2
  • react 16.3.1
  • cocoapods and GoogleSignIn pod version (if applicable)
  • gradle 4.4, android plugin for gradle 3.1.2, and play-services-auth version (if applicable)
馃挜 Bug 馃Android

Most helpful comment

For future reference:

I had a similar issue when started using google-signin.
Posted bellow is the stack trace of the error that happened when the sign in button was clicked. Close to the end of the exception is possible to see that the issue was related to the signing of the APK. I looked up for UNREGISTERED_ON_API_CONSOLE to find the solution.
The issue was that the SHA-1 of the release variant wasn't in the google-services.json file, only the debug variant SHA-1 was there.

I followed these steps and that fixed the issue for me.

I am currently using com.android.support:appcompat-v7:27.0.2, some people reported errors with the version 27.1.0. I'm not sure if this is related to the problem.

08-2513:35:10.891 23811 23811 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@adb71e0 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: Failed to instantiate custom view inflater androidx.appcompat.app.AppCompatViewInflater. Falling back to default. 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: java.lang.ClassNotFoundException: androidx.appcompat.app.AppCompatViewInflater 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.Class.classForName(Native Method) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.Class.forName(Class.java:453) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.Class.forName(Class.java:378) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.support.v7.app.AppCompatDelegateImpl.a(:com.google.android.gms@[email protected] (100400-204998136):1) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.support.v7.app.AppCompatDelegateImpl.onCreateView(:com.google.android.gms@[email protected] (100400-204998136):1) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.DecorView.onResourcesLoaded(DecorView.java:1885) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2599) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2672) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2071) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityTransitionState.setEnterActivityOptions(ActivityTransitionState.java:160) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.Activity.performCreate(Activity.java:7144) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.Activity.performCreate(Activity.java:7127) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.os.Handler.dispatchMessage(Handler.java:106) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.os.Looper.loop(Looper.java:193) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread.main(ActivityThread.java:6669) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.reflect.Method.invoke(Native Method) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.appcompat.app.AppCompatViewInflater" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/framework/com.android.location.provider.jar", zip file "/data/app/com.google.android.gms-Up8WbwBAKxYByb82WLd6VQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.gms-Up8WbwBAKxYByb82WLd6VQ==/lib/arm64, /data/app/com.google.android.gms-Up8WbwBAKxYByb82WLd6VQ==/base.apk!/lib/arm64-v8a, /system/lib64]] 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: ... 30 more 08-25 13:35:10.990 761 761 D [email protected]: LAUNCH OFF 08-25 13:35:10.999 1174 1219 I ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +103ms (total +171ms) 08-25 13:35:12.028 23811 23832 D OpenGLRenderer: endAllActiveAnimators on 0x7213aaea00 (ListView) with handle 0x7213bde120 08-25 13:35:12.127 16788 17101 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException 08-25 13:35:12.140 16788 16803 I .gms.persisten: Background concurrent copying GC freed 333349(25MB) AllocSpace objects, 15(700KB) LOS objects, 41% free, 33MB/57MB, paused 79us total 155.722ms 08-25 13:35:12.147 16788 17101 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method) 08-25 13:35:12.147 16788 17101 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (100400-204998136):13) 08-25 13:35:12.147 16788 17101 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor) 08-25 13:35:12.147 16788 17101 W Conscrypt: at libcore.io.Linux.setsockoptTimeval(Native Method) 08-25 13:35:12.147 16788 17101 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:174) 08-25 13:35:12.157 16788 17101 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException 08-25 13:35:12.157 16788 17101 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method) 08-25 13:35:12.157 16788 17101 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (100400-204998136):13) 08-25 13:35:12.157 16788 17101 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor) 08-25 13:35:12.157 16788 17101 W Conscrypt: at libcore.io.Linux.setsockoptTimeval(Native Method) 08-25 13:35:12.157 16788 17101 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:174) 08-25 13:35:12.168 608 1224 W SurfaceFlinger: Attempting to set client state on removed layer: com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity#0 08-25 13:35:12.169 608 1224 W SurfaceFlinger: Attempting to destroy on removed layer: com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity#0 08-25 13:35:12.317 23811 23811 W AccountChipsFragment: Recording consent failed. 08-25 13:35:12.326 16788 16788 W ChimeraUtils: Non Chimera context 08-25 13:35:12.340 1174 1213 I ActivityManager: Start proc 28167:com.google.android.gms.learning/u0a22 for service com.google.android.gms/.learning.training.background.TrainingGcmTaskService 08-25 13:35:12.326 16788 16788 W ChimeraUtils: Non Chimera context 08-25 13:35:12.353 28167 28167 E id.gms.learnin: Not starting debugger since process cannot load the jdwp agent. 08-25 13:35:12.384 28167 28167 I id.gms.learnin: The ClassLoaderContext is a special shared library. 08-25 13:35:12.387 28167 28167 I chatty : uid=10022 com.google.android.gms.learning identical 1 line 08-25 13:35:12.390 28167 28167 I id.gms.learnin: The ClassLoaderContext is a special shared library. 08-25 13:35:12.398 16788 17101 W Auth : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE 08-25 13:35:12.400 22824 22915 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE 08-25 13:35:12.427 23811 23811 W AutoManageHelper: Unresolved error while connecting client. Stopping auto-manage. 08-25 13:35:12.478 28004 28024 D FA : Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=SignInHubActivity, firebase_previous_id(_pi)=7656383062663495933, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=7656383062663495932}] 08-25 13:35:12.516 22824 28073 V FA-SVC : Logging event: origin=auto,name=screen_view(_vs),params=Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=SignInHubActivity, firebase_previous_id(_pi)=7656383062663495933, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=7656383062663495932}] 08-25 13:35:12.517 28004 28024 V FA : Activity resumed, time: 1209975896

All 33 comments

Could you paste the output of react-native log-android from the start of the app up until you press the login button again? Check the logs that yourself before hand that there is secrets you wouldn't want to expose.

@jozan There you go! Thanks for getting back!

jitsi.log

What scopes are you trying to request? I would try passing only webClientId and see how it goes. Everything else seems to be alright.

You could also try to inspect what happens inside the react-native-google-signin native module in Android Studio by setting breakpoints. I would check what happens inside configure() and signIn().

My only scope is this:

export const GOOGLE_API_SCOPES = [
    'https://www.googleapis.com/auth/youtube.readonly'
];

I try your suggestion and get back shortly

This line gets invoked properly: https://github.com/react-native-community/react-native-google-signin/blob/096e06f83fa456d04588568a3814cc31220d0b9d/android/src/main/java/co/apptailor/googlesignin/PromiseWrapper.java#L13 with the promise object being an instance of com.facebook.react.bridge.PromiseImpl

Then the execution continues on https://github.com/react-native-community/react-native-google-signin/blob/096e06f83fa456d04588568a3814cc31220d0b9d/android/src/main/java/co/apptailor/googlesignin/RNGoogleSigninModule.java#L183 and both of the next 2 lines get executed. But then nothing happens.

However if I intentionally provide a wrong clientId (another valid OAuth client ID), then I get an error saying TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: INVALID_AUDIENCE (but still seeing the same exception mentioned above), which suggests that there is some level of communication with Google happening.

I'm encountering the same problem since moving to rc2. I may need to back down to an earlier version, although I'm not looking forward to that given that the APIs have changed. Any chance there will be a fix for this soon?

@gchallen the fastest way to fix this is if someone who experiences the issue finds the fix and opens a PR. That being said, I plan to take a quick look today but I'm afraid I don't have the time to fix this soon.

Of course. I don't have time to dig into this carefully, but FWIW I have identical login flows working rock solid on RC1. I just backed down to it and they are working again.

I also see this frequently after a bundle reload and rarely after a full Android app reinstall. I noticed that configure used to return a promise in RC1 and no longer does on RC2. Is it possible that this broke something and something is trying to complete the log in before the component is fully initialized? Just a hunch.

Thanks for all of your hard work on this.

identical login flows

@gchallen do you have some code that you can share? At least a snippet with the used scopes and etc.

@zbettenbuk I did not try reproducing this with the repo you provided since I have no idea how to set the whole thing up. However, I tried using the youtube scope you provided with our example app and the outcome is that it works for me. After I tap sign in, a modal is shown (see attached image) and after I confirm, I see my profile information.

I'd like to ask you to try to create a minimal reproduction - can you try reproducing this with the example app? It's also possible that this is a device-specific issue.

webp net-resizeimage 1

Sure:

javascript GoogleSignin.configure({ iosClientId: '<HIDDEN>', webClientId: '<HIDDEN>', hostedDomain: 'illinois.edu' }).then(() => { store.dispatch(authInitializationCompleted()) return GoogleSignin.currentUserAsync() }).then(user => { if (user !== null && Platform.OS === 'android') { return NativeModules.RNGoogleSignin.getAccessToken(user).then(accessToken => { return { ...user, accessToken, accessTokenExpirationDate: ANDROID_TOKEN_EXPIRATION } }) } else { return user } }).then(user => { store.dispatch(authUserUpdated(user)) })
What changed in RC2 is that configure stopped returning a promise, currentUserAsync seemed to be renamed, and also returned the accessToken by default, removing the need for the called directly through NativeModules.

@vonovak: my experience is that it does not fail every time. Sometimes it seems to work, and can even work repeatedly. But when it fails, it's wedged until the app is reinstalled.

@gchallen yes, configure stopped returning a promise, so you cannot chain it with then so that won't work. Please call GoogleSignin.configure once upon app start and then call signIn or signInSilently later on.

Let me repeat - I cannot reproduce this so I do not believe this is a bug.

Both @zbettenbuk and I have seen identical behavior. I guess you can write it off as a coincidence, but it feels like a bug to me.

@gchallen okay, perhaps it is, what I was trying to say is that I do not have a reproduction, so I cannot work on a fix.

Turned out the issue was on our side. We didn't have the Activity.onActivityResult method properly implemented on Android.

@gchallen you may want to check that too.

I'm glad you found the fix @zbettenbuk! :)

We didn't have the Activity.onActivityResult method properly implemented

can you expand on that @zbettenbuk ? Thanks!

Yes, thanks for the help and sorry for the waste of time @jozan !

Glad to hear that someone got this resolved! But I'm a bit confused鈥攖his sounds like a change to the native code. Maybe the docs are out-of-date, but I wasn't aware that there was changes we needed to make to the native code other than the usual RN linkage...?

@vonovak: You can see Activity.onActivityResult stuff implemented here.

@gchallen In pure React Native projects no additional setup is required. All the necessary steps are documented. In @zbettenbuk case he has so called brownfield project where React Native is only used in some parts of the app and the rest is implemented in native Android. I am also unable to reproduce this particular problem. Could you create a reproducible demo of the behaviour you're seeing?

Edit: added missing link. :)

@gchallen @jozan @vonovak yes, absolutely, our project is somewhat special, hence the problem.

If anyone hasn't found it yet, here is the link to the commit that we needed to do: https://github.com/zbettenbuk/jitsi-meet/commit/9f164e3574be14319f5d1dfa5fa048ea343edcd3

If for some reason the commit disappears (e.g. force pushed), you can still find it in the branch or the upstream repo.

I'm closing this since the original issue is resolved. @gchallen kindly open a new issue with a minimal reproduction if the problem persists. Thanks everyone.

FWIW I think that what I'm seeing is caused by this bug in appcompat-v7 27.1.0: https://stackoverflow.com/questions/49629621/appcompatdelegate-failed-to-instantiate-custom-view-inflater-android-support-v7. That prevents the login dialog from opening and at that point the sign-in process is wedged. I've confirmed this by inspecting the Android logs. I'm using 27.1.1 but the fix doesn't seem to have made it in yet.

This doesn't seem like a problem with this module so I opted to not open a new issue. But it could be worth a mention in the docs for those targeting SDK version 27.

@gchallen: you didn't attach the exception you refer to, but if it's saying that AppCompatViewInflator (or something similar) is not found, we have the same error in the log and doesn't seem to cause any issues. It also says that it falls back to some default value.

I see the fallback message but in my case nothing is drawn on the screen. I see a waiting indicator (drawn by my app) but nothing else. Here's the relevant log messages, which show that at least it looks like the library _does_ think that a user account chooser is visible:

08-10 14:49:48.560 896 1623 I ActivityManager: START u0 {act=com.google.android.gms.common.account.CHOOSE_ACCOUNT_USERTILE pkg=com.google.android.gms cmp=com.google.android.gms/.common.account.AccountChipAccountPickerActivity (has extras)} from uid 10018 08-10 14:49:48.561 670 670 D QCOM PowerHAL: LAUNCH HINT: ON 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: Failed to instantiate custom view inflater androidx.appcompat.app.AppCompatViewInflater. Falling back to default. 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: java.lang.ClassNotFoundException: androidx.appcompat.app.AppCompatViewInflater 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at java.lang.Class.classForName(Native Method) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at java.lang.Class.forName(Class.java:453) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at java.lang.Class.forName(Class.java:378) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.support.v7.app.AppCompatDelegateImpl.a(:com.google.android.gms@[email protected] (090400-204998136):1) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.support.v7.app.AppCompatDelegateImpl.onCreateView(:com.google.android.gms@[email protected] (090400-204998136):1) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at com.android.internal.policy.DecorView.onResourcesLoaded(DecorView.java:1933) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2586) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2659) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2067) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.ActivityTransitionState.setEnterActivityOptions(ActivityTransitionState.java:160) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.Activity.performCreate(Activity.java:7016) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.Activity.performCreate(Activity.java:7000) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.ActivityThread.-wrap11(Unknown Source:0) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.os.Handler.dispatchMessage(Handler.java:106) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.os.Looper.loop(Looper.java:164) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at android.app.ActivityThread.main(ActivityThread.java:6494) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at java.lang.reflect.Method.invoke(Native Method) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.appcompat.app.AppCompatViewInflater" on path: DexPathList[[zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/fra$ ework/com.android.location.provider.jar", zip file "/data/app/com.google.android.gms-xEEI2q7ViKf2_2xmpgWgDQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.gms-xEEI2q7ViKf2_2xmpgWgDQ==/lib/arm64, /data/app/com.google.android.gms-xEEI2q7ViKf2_2xmpgWgDQ$ =/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]] 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 08-10 14:49:48.728 18814 18814 I AppCompatDelegate: ... 28 more 08-10 14:49:48.862 670 670 D QCOM PowerHAL: LAUNCH HINT: OFF 08-10 14:49:48.869 896 955 I ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +166ms (total +367ms)

My assumption is that you are already logged in, that's why you don't see the dialog. But i may be wrong. Try to invoke a signOut first (e.g. put in in the componentDidMount until you're testing) and see if you get a signIn window afterwards (or see some other related messages in the logs)

It's possible that this was caused by having two versions of the app-compat library installed. I've fixed that in my build.grade and now I don't seem to be having this issue.

Anyway鈥攖hanks for your patience, and apologies for the red herring.

@gchallen @zbettenbuk @vonovak
I just updated to 1.0.0-rc3 from 0.xx.
This issue is elusive. It only occurs after a few reloads. When I kill the app and start it again, the signIn() works fine. However, after the reload, when you fire the first signIn() ,it is stuck forever. Then you fire another signIn() and it returns this In Progress error: Error: cannot set promise - some async operation is still in progress.

I have to use 'com.google.android.gms:play-services-auth:16.0.0' as oppose to 15.0.1,because of react-native-firebase. Not sure if it is the problem.

@stonecold123: those describe my symptoms exactly. But again, this has not been an issue since I resolved having multiple play services libraries installed. Check your Gradle build output to see if there's a warning about this... or maybe it actually showed up in Android Studio when viewing build.gradle. I also think I added something to force all of my native module to use the same version of the play services libraries.

That said, I also did a fair amount of cleanup around the time the problem went away. I had added a bunch of native modules and things had gotten to be a bit of a mess. So who knows what actually (seems to have) fixed it for me.

For future reference:

I had a similar issue when started using google-signin.
Posted bellow is the stack trace of the error that happened when the sign in button was clicked. Close to the end of the exception is possible to see that the issue was related to the signing of the APK. I looked up for UNREGISTERED_ON_API_CONSOLE to find the solution.
The issue was that the SHA-1 of the release variant wasn't in the google-services.json file, only the debug variant SHA-1 was there.

I followed these steps and that fixed the issue for me.

I am currently using com.android.support:appcompat-v7:27.0.2, some people reported errors with the version 27.1.0. I'm not sure if this is related to the problem.

08-2513:35:10.891 23811 23811 W ActivityThread: handleWindowVisibility: no activity for token android.os.BinderProxy@adb71e0 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: Failed to instantiate custom view inflater androidx.appcompat.app.AppCompatViewInflater. Falling back to default. 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: java.lang.ClassNotFoundException: androidx.appcompat.app.AppCompatViewInflater 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.Class.classForName(Native Method) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.Class.forName(Class.java:453) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.Class.forName(Class.java:378) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.support.v7.app.AppCompatDelegateImpl.a(:com.google.android.gms@[email protected] (100400-204998136):1) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.support.v7.app.AppCompatDelegateImpl.onCreateView(:com.google.android.gms@[email protected] (100400-204998136):1) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:772) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.DecorView.onResourcesLoaded(DecorView.java:1885) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2599) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2672) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2071) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityTransitionState.setEnterActivityOptions(ActivityTransitionState.java:160) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.Activity.performCreate(Activity.java:7144) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.Activity.performCreate(Activity.java:7127) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.os.Handler.dispatchMessage(Handler.java:106) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.os.Looper.loop(Looper.java:193) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at android.app.ActivityThread.main(ActivityThread.java:6669) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.reflect.Method.invoke(Native Method) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.appcompat.app.AppCompatViewInflater" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/framework/com.android.location.provider.jar", zip file "/data/app/com.google.android.gms-Up8WbwBAKxYByb82WLd6VQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.gms-Up8WbwBAKxYByb82WLd6VQ==/lib/arm64, /data/app/com.google.android.gms-Up8WbwBAKxYByb82WLd6VQ==/base.apk!/lib/arm64-v8a, /system/lib64]] 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 08-25 13:35:10.928 23811 23811 I AppCompatDelegate: ... 30 more 08-25 13:35:10.990 761 761 D [email protected]: LAUNCH OFF 08-25 13:35:10.999 1174 1219 I ActivityManager: Displayed com.google.android.gms/.common.account.AccountChipAccountPickerActivity: +103ms (total +171ms) 08-25 13:35:12.028 23811 23832 D OpenGLRenderer: endAllActiveAnimators on 0x7213aaea00 (ListView) with handle 0x7213bde120 08-25 13:35:12.127 16788 17101 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException 08-25 13:35:12.140 16788 16803 I .gms.persisten: Background concurrent copying GC freed 333349(25MB) AllocSpace objects, 15(700KB) LOS objects, 41% free, 33MB/57MB, paused 79us total 155.722ms 08-25 13:35:12.147 16788 17101 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method) 08-25 13:35:12.147 16788 17101 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (100400-204998136):13) 08-25 13:35:12.147 16788 17101 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor) 08-25 13:35:12.147 16788 17101 W Conscrypt: at libcore.io.Linux.setsockoptTimeval(Native Method) 08-25 13:35:12.147 16788 17101 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:174) 08-25 13:35:12.157 16788 17101 W Conscrypt: Could not set socket write timeout: java.lang.reflect.InvocationTargetException 08-25 13:35:12.157 16788 17101 W Conscrypt: at java.lang.reflect.Method.invoke(Native Method) 08-25 13:35:12.157 16788 17101 W Conscrypt: at com.google.android.gms.org.conscrypt.Platform.setSocketWriteTimeout(:com.google.android.gms@[email protected] (100400-204998136):13) 08-25 13:35:12.157 16788 17101 W Conscrypt: Caused by: android.system.ErrnoException: setsockopt failed: EBADF (Bad file descriptor) 08-25 13:35:12.157 16788 17101 W Conscrypt: at libcore.io.Linux.setsockoptTimeval(Native Method) 08-25 13:35:12.157 16788 17101 W Conscrypt: at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:174) 08-25 13:35:12.168 608 1224 W SurfaceFlinger: Attempting to set client state on removed layer: com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity#0 08-25 13:35:12.169 608 1224 W SurfaceFlinger: Attempting to destroy on removed layer: com.google.android.gms/com.google.android.gms.common.account.AccountChipAccountPickerActivity#0 08-25 13:35:12.317 23811 23811 W AccountChipsFragment: Recording consent failed. 08-25 13:35:12.326 16788 16788 W ChimeraUtils: Non Chimera context 08-25 13:35:12.340 1174 1213 I ActivityManager: Start proc 28167:com.google.android.gms.learning/u0a22 for service com.google.android.gms/.learning.training.background.TrainingGcmTaskService 08-25 13:35:12.326 16788 16788 W ChimeraUtils: Non Chimera context 08-25 13:35:12.353 28167 28167 E id.gms.learnin: Not starting debugger since process cannot load the jdwp agent. 08-25 13:35:12.384 28167 28167 I id.gms.learnin: The ClassLoaderContext is a special shared library. 08-25 13:35:12.387 28167 28167 I chatty : uid=10022 com.google.android.gms.learning identical 1 line 08-25 13:35:12.390 28167 28167 I id.gms.learnin: The ClassLoaderContext is a special shared library. 08-25 13:35:12.398 16788 17101 W Auth : [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE 08-25 13:35:12.400 22824 22915 E TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE 08-25 13:35:12.427 23811 23811 W AutoManageHelper: Unresolved error while connecting client. Stopping auto-manage. 08-25 13:35:12.478 28004 28024 D FA : Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=SignInHubActivity, firebase_previous_id(_pi)=7656383062663495933, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=7656383062663495932}] 08-25 13:35:12.516 22824 28073 V FA-SVC : Logging event: origin=auto,name=screen_view(_vs),params=Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=SignInHubActivity, firebase_previous_id(_pi)=7656383062663495933, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=7656383062663495932}] 08-25 13:35:12.517 28004 28024 V FA : Activity resumed, time: 1209975896

@victorgutemberg You just saved my life!

This error rarely happens, but when it happens just shut down your app in multitasking and run again, it's work for me.

Was this page helpful?
0 / 5 - 0 ratings