Open Bezlepkin opened 1 year ago
I'm having the same issue, and logcat is showing this:
ERROR (app bug): attempt to pass an instance of com.tns.gen.java.lang.Runnable as argument 1 to void com.couchbase.lite.Database.inBatch(com.couchbase.lite.UnitOfWork)
java_vm_ext.cc:594] JNI DETECTED ERROR IN APPLICATION: bad arguments passed to void com.couchbase.lite.Database.inBatch(com.couchbase.lite.UnitOfWork) (see above for details)
I do belive the issue comes from https://github.com/triniwiz/nativescript-plugins/blob/6abf47b2de8a4e26a4c141f950f2012996e95753/packages/nativescript-couchbase/index.android.ts#L33: Couchbase Lite seems to be waiting for a UnitOfWork
, but the plugin gives it a Runnable.
I'll try to fix it, but for now, downgrading to 1.3.1 solves this issue. Probably the plugin use a more recent version of Couchbase Lite, but with "old" syntax for this batch operation.
I solved this by creating a new thread for Android :) for iOS left the implementation offered by the plugin.
Same issue here. Rolling back to 1.3.1 solved the problem.
I see that there have been updates to make it work on Android. Yay! @triniwiz update the npm please!
Should be fixed with #180
@triniwiz Please update the npm package.
Hi! I try to use the inBatch method, iOS works, but Android doesn't.