google-signin: GoogleSignin.signIn() never returns/resolves
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@12521024@12.5.21 (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@12521024@12.5.21 (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)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 33 (7 by maintainers)
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.@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.