couchbaselabs / Couchbase-Lite-PhoneGap-Plugin

Plugin to install Couchbase Lite in your PhoneGap app on iOS or Android
183 stars 67 forks source link

_changes stop working in iOS 10 #86

Open pasin opened 7 years ago

pasin commented 7 years ago

The issue originated from https://github.com/couchbase/couchbase-lite-ios/issues/1477.

I believe it's the issue is caused by either the HTTP Client or iOS WebKit. We should do some testing on this.

msanilkumar2020 commented 7 years ago

Any update on this issue?

We are not getting _changes in iOS.

Thanks, Anil Kumar

pasin commented 7 years ago

Sorry, we don't have any update. Can you post exact the _changes request including all parameters that you are using? What is the HTTP client you are using to make _changes request in the application?

Crapulax commented 7 years ago

To provide a bit more information, we workarounded the issue by:

Above is not satisfactory as it requires tricky computations.

*heartbeat: edited (wronly wrote timeout)

pasin commented 7 years ago

I believe a better approach would be adding heartbeat=30000 to the longpoll _changes feed request URL. Another option would be adding timeout to _changes feed request BUT currently couchbase-lite-ios doesn't support _changes feed timeout yet (See https://github.com/couchbase/couchbase-lite-ios/issues/1236).

FYI, we did experience that some HTTP clients do not abort the requests properly after timing out so the requests get stuck and have never returned the result (See https://github.com/couchbase/couchbase-lite-java-core/issues/1296 for more info).

Crapulax commented 7 years ago

Sorry Pasin, I wrongly wrote timeout, we should read heartbeat instead. I update my post accordingly.

I am checking right now if using a promise as timeout can let us remove the tricky stuff on app resume

pasin commented 7 years ago

@Crapulax Thanks for the update.