1

I am getting this exception at runtime:

Uncaught exception in Firebase Database runloop (3.0.0). Please report to firebase-database-client@google.com

I've gone through this article but could not find the solution.

Uncaught exception in Firebase runloop (3.0.0)

Following are my gradle dependencies for Firebase:

implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-firestore:21.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'

Here is the code for writing data in Firebase database:

FirebaseDatabase database = FirebaseDatabase.getInstance().getReference();
database.child("users").child(username).setValue(user);

May be anyone help me solving this. Thanks for your answers!

  • Please check make sure you're following [docs](https://firebase.google.com/docs/database/android/start) from Firebase – Ashish Oct 25 '19 at 09:07

1 Answers1

1

The problem with implementation and instance.

You implemented Firebase Realtime Database in your Android Studio and trying to make instance of Firestore.

Either change the Instance or Implementation.

Firestore Implementation and instance :

implementation 'com.google.firebase:firebase-firestore:21.2.0'

Instance :

FirebaseFirestore db = FirebaseFirestore.getInstance();

And for Firebase Realtime Database :

implementation 'com.google.firebase:firebase-database:19.2.0'

Instance :

FirebaseDatabase database = FirebaseDatabase.getInstance();
Ashish
  • 6,791
  • 3
  • 26
  • 48