Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silently failing login when no network connection #1803

Closed
theHilikus opened this issue Jun 26, 2020 · 2 comments
Closed

Silently failing login when no network connection #1803

theHilikus opened this issue Jun 26, 2020 · 2 comments

Comments

@theHilikus
Copy link

theHilikus commented Jun 26, 2020

Cannot handle network exceptions on signin, just like #164

Step 2: Describe your environment

  • Android device: Emulator
  • Android OS version: 10
  • Google Play Services version: _____
  • Firebase/Play Services SDK version: _____
  • FirebaseUI version: 6.2.0, 6.2.1

Step 3: Describe the problem:

When the user tries to login without an internet connection, firebaseUI fails silently and there's no feedback to the user, nor a return to onActivityResult like other errors in the signin process, where based on an error code we could give the proper feedback to the user

The app actually doesn't crash, which might be different from #164 . The error is just in logcat but there's no way to return control to the main app where we could handle the error by (e.g.) showing a message to the user

Steps to reproduce:

  1. Disable network connection
  2. Try to login using email-link (that's what I use and I can't test with email/password but it might have the same problem)

Observed Results:

  • Logcat shows
E/AuthUI: A sign-in error occurred.
    com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred.
        at com.google.firebase.auth.api.internal.zzeh.zza(com.google.firebase:firebase-auth@@19.3.1:15)
        at com.google.firebase.auth.api.internal.zzfo.zza(com.google.firebase:firebase-auth@@19.3.1:21)
        at com.google.firebase.auth.api.internal.zzfe.zza(com.google.firebase:firebase-auth@@19.3.1:33)
        at com.google.firebase.auth.api.internal.zzfg.zza(com.google.firebase:firebase-auth@@19.3.1:74)
        at com.google.firebase.auth.api.internal.zzen.zza(com.google.firebase:firebase-auth@@19.3.1:18)
        at com.google.android.gms.internal.firebase_auth.zza.onTransact(com.google.firebase:firebase-auth@@19.3.1:13)
        at android.os.Binder.execTransactInternal(Binder.java:1021)
        at android.os.Binder.execTransact(Binder.java:994)

Expected Results:

  • An error message
    or
  • FirebaseUI to return to the calling activity with a proper error code in onActivityResult()
@samtstern
Copy link
Contributor

@theHilikus thanks for reporting this. We should have standard error handling behavior for network errors but looks like we might have missed a spot.

@samtstern
Copy link
Contributor

This issue is fixed and released in version 6.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants