Unable to authenticate firebase login/registration in android

1,340 views
Skip to first unread message

Akinyemi john

unread,
Jun 7, 2018, 3:11:49 PM6/7/18
to GDG Lagos
I am developing an android app that allow users to login and registration before accessing the app content. I decided to use firebase authentication of email and password, when i tested the app in the emulator  it crashed and outputs the following error message in the logcat

<06-05 21:22:17.899 3595-3611/com.xplaincap E/FirebaseInstanceId: Token retrieval failed: AUTHENTICATION_FAILED
06-05 21:23:28.180 3595-3595/com.xplaincap D/AndroidRuntime: Shutting down VM
06-05 21:23:28.181 3595-3595/com.xplaincap E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.xplaincap, PID: 3595
com.google.android.gms.tasks.RuntimeExecutionException: com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred.
at com.google.android.gms.tasks.zzn.getResult(Unknown Source)
at com.xplaincap.RegisterActivity$1$1.onComplete(RegisterActivity.java:75)
at com.google.android.gms.tasks.zzf.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: com.google.firebase.FirebaseNetworkException: A network error (such as timeout, interrupted connection or unreachable host) has occurred.
at com.google.android.gms.internal.zzdxm.zzao(Unknown Source)
at com.google.android.gms.internal.zzdwn.zza(Unknown Source)
at com.google.android.gms.internal.zzdxx.zzap(Unknown Source)
at com.google.android.gms.internal.zzdya.onFailure(Unknown Source)
at com.google.android.gms.internal.zzdxo.onTransact(Unknown Source)
at android.os.Binder.execTransact(Binder.java:453)
06-05 21:24:20.970 3595-3595/com.xplaincap I/Process: Sending signal. PID: 3595 SIG: 9>

Kindly help

Debo Ajagbe

unread,
Jun 7, 2018, 3:26:19 PM6/7/18
to lagos...@googlegroups.com
Run the app on a device or update your emulator play services and make sure you have internet connection.

Sent from Mobile By

Debo Ajagbe

--
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
 
[ Quicklinks ]
Join on G+: http://goo.gl/wKOuQ
Mailing List:http://bit.ly/lagosgtuggroup
Unsubscribe: http://goo.gl/0y8TB
Blog: http://gdglagos.com
Twitter Handle: http://twitter.com/@gdglagos
 
---_---_---_---_---_---_---_---_---_---_---_---_---_---_---
---
You received this message because you are subscribed to the Google Groups "GDG Lagos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagos-gtug+...@googlegroups.com.
To post to this group, send email to lagos...@googlegroups.com.
Visit this group at https://groups.google.com/group/lagos-gtug.
For more options, visit https://groups.google.com/d/optout.

ikhiloya imokhai

unread,
Jun 7, 2018, 3:27:06 PM6/7/18
to GDG Lagos
Hi Akinyemi! Your logs shows that it's a network connection error which means that you should ensure that you have a good network connection before performing the request. FirebaseAuth is pretty fast. You may want to add a loader in your login UI so as to know when the request is performed. You could also use Android studio's debugger tool, just set a break point at the point of making the auth call. Also you could send a gist or code snippet of your authentication code if the error persists.
Reply all
Reply to author
Forward
0 new messages