couchbase / couchbase-lite-ios

Lightweight, embedded, syncable NoSQL database engine for iOS and MacOS apps.
Apache License 2.0
1.62k stars 297 forks source link

doc update is not getting replicated when ios is in offline #2103

Closed sridevi-15 closed 6 years ago

sridevi-15 commented 6 years ago

Environment

steps to reproduce :

  1. login to todo app on ios and android as two differrent users.
  2. Take ios offline (wifi off),
  3. Create doc in android
  4. Get ios online(wifi on), doc will get replicated to ios
  5. update doc in android

Result : Doc does not get updated on ios . Try updating the doc on ios, it won't get replicated to android.

I tried same steps with android offline and created doc in ios i,e vice versa of same steps as above and it worked fine and works as expcted.

cbl logs :

Android : https://gist.github.com/sridevi-15/8ccefb9ba712f16378885d23708143c1 ios : https://gist.github.com/sridevi-15/8e394aae381c04ab5bf7085d8793dc88

sg logs :

https://gist.github.com/sridevi-15/13f7a7ba8aba7cbf04b9881c4fb4481b

pasin commented 6 years ago

@sridevi-15 does the issue happen with iOS to iOS or Android to Android?

sridevi-15 commented 6 years ago

Pasin, I have seen this issue with ios offline and replication from Android to ios

sridevi-15 commented 6 years ago

Pasin , I tried ios to ios i.e ios simulator to ios device with ios device offline -> it passed I tried android to android i.e android emulator to android device with android device offline -> it failed.

I also tried ios device with android emulator having ios device offline -> it failed. but not all the time, sometime with update on emulator did not replicated on device, but sometime it replicated.

I am attaching logs for Android and sg logs.

If it is Android bug I can move to android

android logs : https://gist.github.com/sridevi-15/f5842c82562ae66afd7675ae58b07d2a sg logs : https://gist.github.com/sridevi-15/263d0f40309777222d61ff934d1dccd8

pasin commented 6 years ago

I'm not sure if it's android bug or not. But can you move to android so @hideki can have a quick look?

sridevi-15 commented 6 years ago

opened this ticket in android as it looks like android specific https://github.com/couchbase/couchbase-lite-android/issues/1664