As stated in the subject line, my Cordova app running on Android is experiencing issues with connecting to CB lite after the app has been put in background mode for a number of hours. This is happening to all of my Android users and me.
When I look at the network log of the traffic of the app after resumption, all CB lite calls are pending.
I need urgent help on this as it’s killing user adoption on Android. I’m not experiencing this issue on IOS.
Is there a inactivity timeout setting I can adjust?
Let me clarify “user leaves the app”, the app is background mode and is paused. If the app is shutdown and restarted, everything with CBL is fine. But there’s no way through code to do a full shutdown and restart with Cordova.
I have one request to verity.
From your comment, once the app resumed, the app can obtain URL of CBL REST API endpoint. Can you try to access its URL from Android browser or to access from out-side of Android device/emulator by browser or curl command?
If Http server can NOT response, Couchbase Lite Java Listener has issue or enter bad state.
But when trying to connect to the app database, the API call stays in “pending” mode, no response.
Could you please share the details of “pending” mode? If you wait for a while, do you receive timeout or some error response?
We’d like to reproduce this issue, could you please provide CBL for PhoneGap version?
I just ran a test where on resume my code is making two calls, one to the local db and one to sync gateway. The sync gateway responded with 200, where as the local db is still in “pending” state. This proves to me that the problem is with CBL and not the WebView.