Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Error: GoogleApiClient is not connected yet.
Browse files Browse the repository at this point in the history
```
ERROR Error: Uncaught (in promise): Error: java.lang.IllegalStateException: GoogleApiClient is not connected yet.
    com.google.android.gms.common.api.internal.zzba.zze(Unknown Source)
    com.google.android.gms.auth.api.signin.internal.zze.zzb(Unknown Source)
    com.google.android.gms.auth.api.signin.internal.zzc.revokeAccess(Unknown Source)
    com.tns.Runtime.callJSMethodNative(Native Method)
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
    com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
    com.tns.Runtime.callJSMethod(Runtime.java:957)
    com.tns.Runtime.callJSMethod(Runtime.java:941)
    com.tns.Runtime.callJSMethod(Runtime.java:933)
    com.tns.gen.java.lang.Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.onClick(Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.java:12)
    android.view.View.performClick(View.java:5637)
    android.view.View$PerformClick.run(View.java:22429)
    android.os.Handler.handleCallback(Handler.java:751)
    android.os.Handler.dispatchMessage(Handler.java:95)
    android.os.Looper.loop(Looper.java:154)
    android.app.ActivityThread.main(ActivityThread.java:6119)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Error: java.lang.IllegalStateException: GoogleApiClient is not connected yet.
    com.google.android.gms.common.api.internal.zzba.zze(Unknown Source)
    com.google.android.gms.auth.api.signin.internal.zze.zzb(Unknown Source)
    com.google.android.gms.auth.api.signin.internal.zzc.revokeAccess(Unknown Source)
    com.tns.Runtime.callJSMethodNative(Native Method)
    com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1088)
    com.tns.Runtime.callJSMethodImpl(Runtime.java:970)
    com.tns.Runtime.callJSMethod(Runtime.java:957)
    com.tns.Runtime.callJSMethod(Runtime.java:941)
    com.tns.Runtime.callJSMethod(Runtime.java:933)
    com.tns.gen.java.lang.Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.onClick(Object_frnal_ts_helpers_l58_c38__ClickListenerImpl.java:12)
    android.view.View.performClick(View.java:5637)
    android.view.View$PerformClick.run(View.java:22429)
    android.os.Handler.handleCallback(Handler.java:751)
    android.os.Handler.dispatchMessage(Handler.java:95)
    android.os.Looper.loop(Looper.java:154)
    android.app.ActivityThread.main(ActivityThread.java:6119)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
    at file:///data/data/__REDACTED__/files/app/tns_modules/nativescript-plugin-firebase/firebase.js:799:70
    at new ZoneAwarePromise (file:///data/data/__REDACTED__/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:777:29)
    at Object.firebase_common_1.firebase.logout (file:///data/data/__REDACTED__/files/app/tns_modules/nativescript-plugin-firebase/firebase.js:795:12)
    ...
```
  • Loading branch information
Dick Smith committed Mar 5, 2018
1 parent 60e7dc7 commit bb5bb5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/firebase.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ firebase.logout = arg => {
com.google.firebase.auth.FirebaseAuth.getInstance().signOut();

// also disconnect from Google otherwise ppl can't connect with a different account
if (firebase._mGoogleApiClient) {
if (firebase._mGoogleApiClient && firebase._mGoogleApiClient.isConnected()) {
com.google.android.gms.auth.api.Auth.GoogleSignInApi.revokeAccess(firebase._mGoogleApiClient);
}

Expand Down

0 comments on commit bb5bb5e

Please sign in to comment.