CBL 2.8 failed to delete database

After some time my startup database code failed to delete it with exception:
SQLite db has active statements, can’t be deleted

That is how i delete db:

rawDatabase.delete();
rawDatabase.close();

What may be the cause for this?

P.S. No replicators or listeners are active during deletion of db

Once a database is deleted, there’s nothing to close…

You are right, but unfotunatelly i got this error on the first line of code (i.e. delete())

Ok.

I would say we’d have a much better chance of figuring out what is going wrong, here, if we actually had some information about the failure. Can we get a DEBUG level log, for ALL_DOMAINS, for about a minute preceding the failure, up to and including the failure stack trace?

@blake.meike Thanks for reply Blake!

Stack trace:

2021-02-18 09:46:21.401 12537-12659/app W/System.err: CouchbaseLiteException{CouchbaseLite,16,'SQLite db has active statements, can’t be deleted
2021-02-18 09:46:21.401 12537-12659/app W/System.err: (CouchbaseLite Android v2.8.0-273 (EE/release, Commit/d0dcb09fac@a10b5970562a Core/2.8.0 (273) at 2020-09-23T22:10:05.765Z) on Java; Android 9; LLD-L31)’}
2021-02-18 09:46:21.401 12537-12659/app W/System.err: at com.couchbase.lite.internal.CBLStatus.toCouchbaseLiteException(CBLStatus.java:96)
2021-02-18 09:46:21.401 12537-12659/app W/System.err: at com.couchbase.lite.internal.CBLStatus.convertException(CBLStatus.java:45)
2021-02-18 09:46:21.401 12537-12659/app W/System.err: at com.couchbase.lite.AbstractDatabase.shutdown(AbstractDatabase.java:1695)
2021-02-18 09:46:21.401 12537-12659/app W/System.err: at com.couchbase.lite.AbstractDatabase.delete(AbstractDatabase.java:773)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at com.couchbase.lite.Database.delete(Database.java:33)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.dataModel.RecreateNoSqlDatabase.DropDatabase(RecreateNoSqlDatabase.java:28)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.dataModel.RecreateNoSqlDatabase.DropDatabaseAndApplyMigrations(RecreateNoSqlDatabase.java:44)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.helperClasses.OnUserSignedInIfNewUserDropDatabase.onUserSignedIn(OnUserSignedInIfNewUserDropDatabase.java:26)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.viewModel.AuthorizationViewModel$1.Successful(AuthorizationViewModel.java:246)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.viewModel.AuthorizationViewModel$1.Successful(AuthorizationViewModel.java:225)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.services.AuthorizationService$1.Success(AuthorizationService.java:47)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at app.services.helpers.ServiceHelper$1.onResponse(ServiceHelper.java:115)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2021-02-18 09:46:21.402 12537-12659/app W/System.err: at java.lang.Thread.run(Thread.java:784)
2021-02-18 09:46:21.403 12537-12659/app W/System.err: Caused by: LiteCoreException{domain=1, code=16, msg=SQLite db has active statements, can’t be deleted}
2021-02-18 09:46:21.403 12537-12659/app W/System.err: at com.couchbase.lite.internal.core.C4Database.delete(Native Method)
2021-02-18 09:46:21.403 12537-12659/app W/System.err: at com.couchbase.lite.internal.core.C4Database.delete(C4Database.java:117)
2021-02-18 09:46:21.403 12537-12659/app W/System.err: at com.couchbase.lite.-$$Lambda$oDs8YQC1RAP18TZgiPd8o9rig3o.accept(Unknown Source:2)
2021-02-18 09:46:21.403 12537-12659/app W/System.err: at com.couchbase.lite.AbstractDatabase.shutdown(AbstractDatabase.java:1694)
2021-02-18 09:46:21.403 12537-12659/app W/System.err: … 15 more

Verbose logging (logs before exception):

2021-02-18 09:45:43.580 12537-12580/app D/FA: Debug-level message logging enabled
2021-02-18 09:45:43.697 12537-12537/app I/CouchbaseLite/DATABASE: CBL-ANDROID Initialized: CouchbaseLite Android v2.8.0-273 (EE/release, Commit/d0dcb09fac(At)a10b5970562a Core/2.8.0 (273) at 2020-09-23T22:10:05.765Z) on Java; Android 9; LLD-L31
2021-02-18 09:45:43.705 12537-12537/app W/CouchbaseLite/DATABASE: Changing temp dir to </data/data/app/files/mainDb/CouchbaseLiteTemp> after the previous dir </storage/emulated/0/Android/data/app/files/CouchbaseLiteTemp/> has already been used
2021-02-18 09:45:43.710 12537-12537/app I/CouchbaseLite/DATABASE: {N8litecore8DataFile6SharedE#1}==> N8litecore8DataFile6SharedE 0x722ffd5ed0 (At)0x722ffd5ed0
2021-02-18 09:45:43.710 12537-12537/app D/CouchbaseLite/DATABASE: {N8litecore8DataFile6SharedE#1} created for DataFile 0x722ffd31c0 at /data/data/app/files/mainDb/pledge_tasks_db.cblite2/db.sqlite3
2021-02-18 09:45:43.710 12537-12537/app I/CouchbaseLite/DATABASE: {DB#2}==> N8litecore14SQLiteDataFileE /data/data/app/files/mainDb/pledge_tasks_db.cblite2/db.sqlite3 (At)0x722ffd31c0
2021-02-18 09:45:43.711 12537-12537/app I/CouchbaseLite/DATABASE: {DB#2} Opening database
2021-02-18 09:45:43.721 12537-12537/app I/CouchbaseLite/DATABASE: PRAGMA cache_size=-10240; PRAGMA mmap_size=52428800; PRAGMA synchronous=normal; PRAGMA journal_size_limit=5242880; PRAGMA case_sensitive_like=true
2021-02-18 09:45:43.722 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.723 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:45:43.725 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.727 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.728 12537-12537/app W/CouchbaseLite/DATABASE: Database.log.getFile().getConfig() is now null: logging is disabled. Log files required for product support are not being generated.
2021-02-18 09:45:43.734 12537-12537/app I/CouchbaseLite/DATABASE: BEGIN
2021-02-18 09:45:43.734 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:45:43.735 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.736 12537-12537/app I/chatty: uid=10304(app) identical 1 line
2021-02-18 09:45:43.737 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.737 12537-12537/app I/CouchbaseLite/DATABASE: {DB#2} Transaction exiting scope without explicit commit; aborting
2021-02-18 09:45:43.737 12537-12537/app I/CouchbaseLite/DATABASE: ROLLBACK
2021-02-18 09:45:43.739 12537-12537/app I/CouchbaseLite/DATABASE: BEGIN
2021-02-18 09:45:43.739 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:45:43.740 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.741 12537-12537/app I/chatty: uid=10304(app) identical 1 line
2021-02-18 09:45:43.741 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.741 12537-12537/app I/CouchbaseLite/DATABASE: {DB#2} Transaction exiting scope without explicit commit; aborting
2021-02-18 09:45:43.742 12537-12537/app I/CouchbaseLite/DATABASE: ROLLBACK
2021-02-18 09:45:43.744 12537-12537/app I/CouchbaseLite/DATABASE: BEGIN
2021-02-18 09:45:43.744 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:45:43.745 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.745 12537-12537/app I/chatty: uid=10304(app) identical 1 line
2021-02-18 09:45:43.746 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.746 12537-12537/app I/CouchbaseLite/DATABASE: {DB#2} Transaction exiting scope without explicit commit; aborting
2021-02-18 09:45:43.746 12537-12537/app I/CouchbaseLite/DATABASE: ROLLBACK
2021-02-18 09:45:43.747 12537-12537/app I/CouchbaseLite/DATABASE: BEGIN
2021-02-18 09:45:43.747 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:45:43.748 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.749 12537-12537/app I/chatty: uid=10304(app) identical 1 line
2021-02-18 09:45:43.749 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sql FROM sqlite_master WHERE name = ? AND type = ? AND tbl_name = ?
2021-02-18 09:45:43.749 12537-12537/app I/CouchbaseLite/DATABASE: {DB#2} Transaction exiting scope without explicit commit; aborting
2021-02-18 09:45:43.750 12537-12537/app I/CouchbaseLite/DATABASE: ROLLBACK
2021-02-18 09:45:43.755 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_default WHERE key=?
2021-02-18 09:45:43.756 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:45:43.761 12537-12537/app I/appName: Db created
2021-02-18 09:45:44.017 12537-12537/app I/CouchbaseLite/QUERY: {Query#3}==> N8litecore11SQLiteQueryE {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]} (At)0x723a1a3d50
2021-02-18 09:45:44.017 12537-12537/app I/CouchbaseLite/QUERY: {Query#3} Compiling JSON query: {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]}
2021-02-18 09:45:44.017 12537-12537/app I/CouchbaseLite/QUERY: {Query#3} Compiled as SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.018 12537-12537/app I/CouchbaseLite/DATABASE: Compiled {Query#3}: SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.019 12537-12537/app I/CouchbaseLite/DATABASE: SAVEPOINT roTransaction
2021-02-18 09:45:44.020 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT lastSeq FROM kvmeta WHERE name=?
2021-02-18 09:45:44.020 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT purgeCnt FROM kvmeta WHERE name=?
2021-02-18 09:45:44.020 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.021 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#4}==> N8litecore21SQLiteQueryEnumeratorE 0x721d8196d8 (At)0x721d8196d8
2021-02-18 09:45:44.021 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#4} Created on {Query#3} with 0 rows (2 bytes) in 0.189ms
2021-02-18 09:45:44.022 12537-12537/app I/CouchbaseLite/DATABASE: RELEASE SAVEPOINT roTransaction
2021-02-18 09:45:44.023 12537-12537/app I/CouchbaseLite/QUERY: End of query enumeration
2021-02-18 09:45:44.646 12537-12537/app I/CouchbaseLite/QUERY: {Query#5}==> N8litecore11SQLiteQueryE {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]} (At)0x723a1a44d0
2021-02-18 09:45:44.646 12537-12537/app I/CouchbaseLite/QUERY: {Query#5} Compiling JSON query: {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]}
2021-02-18 09:45:44.646 12537-12537/app I/CouchbaseLite/QUERY: {Query#5} Compiled as SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.646 12537-12537/app I/CouchbaseLite/DATABASE: Compiled {Query#5}: SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.647 12537-12537/app I/CouchbaseLite/DATABASE: SAVEPOINT roTransaction
2021-02-18 09:45:44.647 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT lastSeq FROM kvmeta WHERE name=?
2021-02-18 09:45:44.648 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT purgeCnt FROM kvmeta WHERE name=?
2021-02-18 09:45:44.648 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.648 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#6}==> N8litecore21SQLiteQueryEnumeratorE 0x721d9d37f8 (At)0x721d9d37f8
2021-02-18 09:45:44.648 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#6} Created on {Query#5} with 0 rows (2 bytes) in 0.148ms
2021-02-18 09:45:44.648 12537-12537/app I/CouchbaseLite/DATABASE: RELEASE SAVEPOINT roTransaction
2021-02-18 09:45:44.649 12537-12537/app I/CouchbaseLite/QUERY: End of query enumeration
2021-02-18 09:45:44.652 12537-12537/app I/CouchbaseLite/QUERY: {Query#7}==> N8litecore11SQLiteQueryE {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]} (At)0x723a1a4590
2021-02-18 09:45:44.652 12537-12537/app I/CouchbaseLite/QUERY: {Query#7} Compiling JSON query: {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]}
2021-02-18 09:45:44.653 12537-12537/app I/CouchbaseLite/QUERY: {Query#7} Compiled as SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.653 12537-12537/app I/CouchbaseLite/DATABASE: Compiled {Query#7}: SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/DATABASE: SAVEPOINT roTransaction
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT lastSeq FROM kvmeta WHERE name=?
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT purgeCnt FROM kvmeta WHERE name=?
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#8}==> N8litecore21SQLiteQueryEnumeratorE 0x721d9d3898 (At)0x721d9d3898
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#8} Created on {Query#7} with 0 rows (2 bytes) in 0.087ms
2021-02-18 09:45:44.654 12537-12537/app I/CouchbaseLite/DATABASE: RELEASE SAVEPOINT roTransaction
2021-02-18 09:45:44.655 12537-12537/app I/CouchbaseLite/QUERY: End of query enumeration
2021-02-18 09:45:44.663 12537-12537/app D/ZrHung.AppEyeUiProbe: notify runnable to start.
2021-02-18 09:45:44.671 12537-12537/app I/CouchbaseLite/QUERY: {Query#9}==> N8litecore11SQLiteQueryE {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]} (At)0x723a1a4650
2021-02-18 09:45:44.672 12537-12537/app I/CouchbaseLite/QUERY: {Query#9} Compiling JSON query: {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]}
2021-02-18 09:45:44.672 12537-12537/app I/CouchbaseLite/QUERY: {Query#9} Compiled as SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.673 12537-12537/app I/CouchbaseLite/DATABASE: Compiled {Query#9}: SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.673 12537-12537/app I/CouchbaseLite/DATABASE: SAVEPOINT roTransaction
2021-02-18 09:45:44.674 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT lastSeq FROM kvmeta WHERE name=?
2021-02-18 09:45:44.674 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT purgeCnt FROM kvmeta WHERE name=?
2021-02-18 09:45:44.674 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.674 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#10}==> N8litecore21SQLiteQueryEnumeratorE 0x721d9d3938 (At)0x721d9d3938
2021-02-18 09:45:44.675 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#10} Created on {Query#9} with 0 rows (2 bytes) in 0.130ms
2021-02-18 09:45:44.675 12537-12537/app I/CouchbaseLite/DATABASE: RELEASE SAVEPOINT roTransaction
2021-02-18 09:45:44.675 12537-12537/app I/CouchbaseLite/QUERY: End of query enumeration
2021-02-18 09:45:44.680 12537-12537/app I/CouchbaseLite/QUERY: {Query#11}==> N8litecore11SQLiteQueryE {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]} (At)0x723a1a4710
2021-02-18 09:45:44.681 12537-12537/app I/CouchbaseLite/QUERY: {Query#11} Compiling JSON query: {“LIMIT”:1,“WHAT”:[[".UserEmail"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]}
2021-02-18 09:45:44.681 12537-12537/app I/CouchbaseLite/QUERY: {Query#11} Compiled as SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.681 12537-12537/app I/CouchbaseLite/DATABASE: Compiled {Query#11}: SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.682 12537-12537/app I/CouchbaseLite/DATABASE: SAVEPOINT roTransaction
2021-02-18 09:45:44.683 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT lastSeq FROM kvmeta WHERE name=?
2021-02-18 09:45:44.683 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT purgeCnt FROM kvmeta WHERE name=?
2021-02-18 09:45:44.683 12537-12537/app I/CouchbaseLite/DATABASE: … SELECT fl_result(fl_value(_doc.body, ‘UserEmail’)) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:45:44.683 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#12}==> N8litecore21SQLiteQueryEnumeratorE 0x721d9d39d8 (At)0x721d9d39d8
2021-02-18 09:45:44.684 12537-12537/app I/CouchbaseLite/QUERY: {QueryEnum#12} Created on {Query#11} with 0 rows (2 bytes) in 0.197ms
2021-02-18 09:45:44.684 12537-12537/app I/CouchbaseLite/DATABASE: RELEASE SAVEPOINT roTransaction
2021-02-18 09:45:44.684 12537-12537/app I/CouchbaseLite/QUERY: End of query enumeration
2021-02-18 09:46:21.301 12537-12659/app I/CouchbaseLite/QUERY: {Query#13}==> N8litecore11SQLiteQueryE {“LIMIT”:1,“WHAT”:[["._id"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]} (At)0x723a1a35d0
2021-02-18 09:46:21.301 12537-12659/app I/CouchbaseLite/QUERY: {Query#13} Compiling JSON query: {“LIMIT”:1,“WHAT”:[["._id"]],“WHERE”:[“AND”,[“NOT”,[“OR”,[“IS”,[".type"],null],[“IS”,[".type"],[“MISSING”]]]],[“AND”,["=",[".type"],“UserAuthorization”],[“NOT”,[“OR”,[“IS”,[".UserEmail"],null],[“IS”,[".UserEmail"],[“MISSING”]]]]]]}
2021-02-18 09:46:21.301 12537-12659/app I/CouchbaseLite/QUERY: {Query#13} Compiled as SELECT fl_result(_doc.key) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:46:21.301 12537-12659/app I/CouchbaseLite/DATABASE: Compiled {Query#13}: SELECT fl_result(_doc.key) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/DATABASE: SAVEPOINT roTransaction
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/DATABASE: … SELECT lastSeq FROM kvmeta WHERE name=?
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/DATABASE: … SELECT purgeCnt FROM kvmeta WHERE name=?
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/DATABASE: … SELECT fl_result(_doc.key) FROM kv_default AS _doc WHERE (NOT (fl_value(_doc.body, ‘type’) = fl_null() OR fl_value(_doc.body, ‘type’) IS NULL) AND (fl_value(_doc.body, ‘type’) = ‘UserAuthorization’ AND NOT (fl_value(_doc.body, ‘UserEmail’) = fl_null() OR fl_value(_doc.body, ‘UserEmail’) IS NULL))) AND (_doc.flags & 1 = 0) LIMIT MAX(0, 1)
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/QUERY: {QueryEnum#14}==> N8litecore21SQLiteQueryEnumeratorE 0x721d5cb518 (At)0x721d5cb518
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/QUERY: {QueryEnum#14} Created on {Query#13} with 0 rows (2 bytes) in 0.118ms
2021-02-18 09:46:21.302 12537-12659/app I/CouchbaseLite/DATABASE: RELEASE SAVEPOINT roTransaction
2021-02-18 09:46:21.303 12537-12659/app I/CouchbaseLite/QUERY: End of query enumeration
2021-02-18 09:46:21.305 12537-12659/app I/CouchbaseLite/QUERY: {Query#11} Closing query (db is closing)
2021-02-18 09:46:21.306 12537-12659/app I/CouchbaseLite/QUERY: {Query#9} Closing query (db is closing)
2021-02-18 09:46:21.306 12537-12659/app I/CouchbaseLite/QUERY: {Query#13} Closing query (db is closing)
2021-02-18 09:46:21.306 12537-12659/app I/CouchbaseLite/QUERY: {Query#5} Closing query (db is closing)
2021-02-18 09:46:21.306 12537-12659/app I/CouchbaseLite/QUERY: {Query#7} Closing query (db is closing)
2021-02-18 09:46:21.306 12537-12659/app I/CouchbaseLite/QUERY: {Query#3} Closing query (db is closing)
2021-02-18 09:46:21.347 12537-12659/app I/CouchbaseLite/DATABASE: … SELECT sequence, flags, 0, version, body FROM kv_info WHERE key=?
2021-02-18 09:46:21.392 12537-12659/app I/CouchbaseLite/DATABASE: … PRAGMA page_count
2021-02-18 09:46:21.392 12537-12659/app I/CouchbaseLite/DATABASE: … PRAGMA freelist_count
2021-02-18 09:46:21.393 12537-12659/app W/CouchbaseLite/DATABASE: {DB#2} SQLite::Database 0x723a0d9f60 close deferred due to open sqlite_stmt: SELECT sequence, flags, 0, version, body FROM kv_info WHERE key='SchemaKeys’

For now solved problem according to the solution in this post:
https://forums.couchbase.com/t/db023-database-closing-and-continuous-replication/16185

But seems strange anyways. Never faced this problem in CBL 1.4