2

I have an Android app that uses the Firebase Realtime Database. The app works perfectly on mobile data networks (like Vodafone 4G) and most Wi-Fi networks.

The Problem:

When the device is connected to a specific ISP, Jio Fiber broadband (Wi-Fi), the connection to the Realtime Database fails silently. My ValueEventListener is attached, but neither onDataChange() nor onCancelled(DatabaseError error) is ever called. The app simply hangs, waiting for data that never arrives.

Troubleshooting Steps & Findings:

I've confirmed this is a network-specific issue:

Changing Private DNS on Android: Setting the Private DNS on the device itself to dns.google or Cloudflare's equivalent did not work.

Using a VPN: When I use a VPN on the same Jio Wi-Fi network, the connection works perfectly.

Changing DNS on the Router: When I change the DNS servers on the Jio router itself to Google's (8.8.8.8) or Cloudflare's (1.1.1.1), the connection works perfectly for all devices on the network.

My Questions:

Why does the Firebase SDK fail silently in this scenario? Why isn't onCancelled() triggered to report a network timeout or connection error?

Why would a router-level DNS change succeed while a device-level Private DNS (DNS-over-TLS) change fails? Does this imply the ISP is blocking the required port (853)?

Update: Now Google is showing this on firebase realtime dashboard screen -"Certain users in India may be unable to access RTDB. We are working on a fix." It is almost end of second day but the issue is not fixed. It is strange that big companies like Google having difficulty to get this issue fixed. Firebase Realtime Database Console Screenshot

3
  • Same thing happening with me from last couples of days! I think it's a bug from firebase end. because it's working since last 4 years. Commented Aug 1 at 16:03
  • Facing the same issue while I am trying to update a node while on Jio network but it works on Airtel network. Commented Aug 4 at 18:02
  • That issue was from Jio's end, they have fixed it. You can check Commented Aug 7 at 12:02

2 Answers 2

1

I'm facing the same issue with Jio network and Firebase Realtime Database. The listener doesn't trigger onDataChange() or onCancelled() — it just hangs.

Tested fixes:

  • Changing APN from IPv4/IPv6 to IPv4 works (but not ideal for users).

  • Private DNS (like dns.google) on device doesn’t help.

  • VPN or router-level DNS change (to 8.8.8.8) fixes it.

Workaround:
I now use a Firebase Cloud Function as a proxy to access Realtime Database. This works reliably even on Jio.

Sign up to request clarification or add additional context in comments.

1 Comment

How do you use Firebase Cloud Function as proxy to access Realtime Database?
-1
  1. Change APN to IPv4-only (temporary fix, not ideal for users).

  2. Use VPN (forces IPv4 routing).

  3. Router-level DNS (8.8.8.8) or DNS override app (like Intra by Jigsaw) works.

    Add a manual timeout to detect stalled connections

    val timeout = Handler(Looper.getMainLooper())
    val timeoutRunnable = Runnable {
        Log.e("Firebase", "Timeout: Possible Jio IPv6 issue")
        // Show error message or retry
    }
    timeout.postDelayed(timeoutRunnable, 10000)
    
    FirebaseDatabase.getInstance().reference
        .child("your/path")
        .addListenerForSingleValueEvent(object : ValueEventListener {
            override fun onDataChange(snapshot: DataSnapshot) {
                timeout.removeCallbacks(timeoutRunnable)
                // Handle data
            }
            override fun onCancelled(error: DatabaseError) {
                timeout.removeCallbacks(timeoutRunnable)
                // Handle error
            }
        })
    
    

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.