[OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds

633 views
Skip to first unread message

John Hansen

unread,
Jun 17, 2020, 8:37:11 AM6/17/20
to Firebase Google Group
Hi, I'm trying to use Cloud Firestore in my Android app.

I have a fairly simple database structure e.g. /database/users/user/(some attributes)
And, I populated it in the console w/ some data.

In my Android App, I'm having trouble doing a simple read of the database and getting: "[OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds"

My read code is just like the Firestore samples:
val docRef = database.collection(USERS).document(uid)
                docRef.get().addOnSuccessListener {doc ->
                    doc?.let {
                        PLog.i(TAG, "updatePortfolioFromFirestore: doc: ${doc.data}")
                    }
                }.addOnFailureListener {
                    PLog.i(TAG, "updatePortfolioFromFirestore: exception: ${it.localizedMessage}")
                }

Execution never returns with the doc data.
There is nothing wrong with my WiFi or the device and I've tried the code on multiple devices and the Emulator - same problem.

I've turned on FirebaseFirestore.setLoggingEnabled(true) but don't see anything useful in that log output.

I built a small program with another database just to try and reproduce but its working fine.
I checked the build.gradle files between my small sample project and the target and they are all same and fine.

What else can I do to debug this? Any help appreciated. Thanks.

jh
Reply all
Reply to author
Forward
0 new messages