Issue with Google Login on Android

#1

Hi all,

Having an issue with Google sign-in on Android devices only. When the popup is opened, we get a stack trace like the below.

11-06 22:41:24.529 29821 29821 I AppCompatDelegate: Failed to instantiate custom view inflater android.support.v7.app.AppCompatViewInflater. Falling back to default.
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: java.lang.ClassNotFoundException: android.support.v7.app.AppCompatViewInflater
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at java.lang.Class.classForName(Native Method)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at java.lang.Class.forName(Class.java:400)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at java.lang.Class.forName(Class.java:326)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.support.v7.app.AppCompatDelegateImpl.a(:com.google.android.gms@14366017@14.3.66 (040306-213742215):1)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.support.v7.app.AppCompatDelegateImpl.onCreateView(:com.google.android.gms@14366017@14.3.66 (040306-213742215):1)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at com.android.internal.policy.DecorView.onResourcesLoaded(DecorView.java:1821)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at com.android.internal.policy.PhoneWindow.generateLayout(PhoneWindow.java:2555)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2628)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at com.android.internal.policy.PhoneWindow.getDecorView(PhoneWindow.java:2047)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.ActivityTransitionState.setEnterActivityOptions(ActivityTransitionState.java:158)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.Activity.performCreateCommon(Activity.java:6679)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.Activity.performCreate(Activity.java:6686)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2637)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2751)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.ActivityThread.-wrap12(ActivityThread.java)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.os.Handler.dispatchMessage(Handler.java:102)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.os.Looper.loop(Looper.java:154)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at android.app.ActivityThread.main(ActivityThread.java:6186)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at java.lang.reflect.Method.invoke(Native Method)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
11-06 22:41:24.529 29821 29821 I AppCompatDelegate: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Following this, you can choose a Google account to sign in with, but then nothing happens. In our code, we do something like this:

this.setState({ googleLoading: true });

const { type, idToken } = await Google.logInAsync({
    androidClientId: this.configuration.google.expoAndroidClientId,
    androidStandaloneAppClientId: this.configuration.google.androidClientId,
    iosClientId: this.configuration.google.expoIosClientId,
    iosStandaloneAppClientId: this.configuration.google.iosClientId,
    scopes: ["profile", "email"],
    webClientId: this.configuration.google.webClientId,
});

if (type === "success") {
    // do something here then redirects
} else {
    this.setState({ googleLoading: false });
}

Neither of the final paths are reached, the callback just freezes. Happy to help with further logging if required, this is a fairly significant issue for us as it’s blocking us deploying anything on Android.

closed #2

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.