Android Slow To Reconnect After Device Goes To Sleep

Hey guys, Awesome work on this library!

Running into one weird issue. Android only but happening on multiple Android devices that are running a number of apps. The repro is something like:

  1. Open App
  2. Let phone sleep for five minutes
  3. Wake phone
  4. Push to a firebase Ref (e.g. firebaseDatabase.ref('rooms/roomId/messages').push(newMessage);)

The new message is synced to the localCache but NOT to my firebase DB. This is normal, it’s working as if it were offline. I would expect it to sync shortly after but it’s taking over 60 seconds to sync.

Running adb logcat whenever I try to call .push I see the message Calling JS function after bridge has been destroyed

Have you guys ever encountered anything like this / have any idea what’s going on? Thanks!

Environment

  1. Target Platform (e.g. iOS, Android): Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10):
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant):
  4. React Native version (e.g. 0.45.1): 0.44.3
  5. RNFirebase Version (e.g. 2.0.2): 1.1.0

Author: Fantashit

1 thought on “Android Slow To Reconnect After Device Goes To Sleep

  1. Do you guys know if there’s any kind of reason why android just won’t connect under certain network circumstances? We’ve had it with a few users where they just go offline and don’t go back online, over a few versions now (currently 3.1.0), and it only happens on android. Is anyone else experiencing this?

Comments are closed.

Android Slow To Reconnect After Device Goes To Sleep

Hey guys, Awesome work on this library!

Running into one weird issue. Android only but happening on multiple Android devices that are running a number of apps. The repro is something like:

  1. Open App
  2. Let phone sleep for five minutes
  3. Wake phone
  4. Push to a firebase Ref (e.g. firebaseDatabase.ref('rooms/roomId/messages').push(newMessage);)

The new message is synced to the localCache but NOT to my firebase DB. This is normal, it’s working as if it were offline. I would expect it to sync shortly after but it’s taking over 60 seconds to sync.

Running adb logcat whenever I try to call .push I see the message Calling JS function after bridge has been destroyed

Have you guys ever encountered anything like this / have any idea what’s going on? Thanks!

Environment

  1. Target Platform (e.g. iOS, Android): Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10):
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant):
  4. React Native version (e.g. 0.45.1): 0.44.3
  5. RNFirebase Version (e.g. 2.0.2): 1.1.0

Author: Fantashit

1 thought on “Android Slow To Reconnect After Device Goes To Sleep

  1. Do you guys know if there’s any kind of reason why android just won’t connect under certain network circumstances? We’ve had it with a few users where they just go offline and don’t go back online, over a few versions now (currently 3.1.0), and it only happens on android. Is anyone else experiencing this?

Comments are closed.