I’m using a pre-built database and installing it on first-run using ReplaceDatabase. It loads and is functional on iOS, but using the same method on android is failing when we try to create our first view.
The code I am using for creating and loading the database is described in this post.
When I try to create a view, I am getting this nasty sqlite error:
[Mono] Assembly Ref addref Couchbase.Lite[0xb7cddf78] -> System.Core[0xb7e8ccc0]: 11
[SQLiteLog] (11) database corruption at line 53693 of [00bb9c9ce4]
[SQLiteLog] (11) statement aborts at 5: [INSERT INTO views (name,version) VALUES (?,?)] database disk image is malformed
SqlitePCLRawStorageEngine: Error inserting into table views
11:
SQLitePCL.Ugly.ugly+sqlite3_exception: Exception of type 'SQLitePCL.Ugly.ugly+sqlite3_exception' was thrown.
at SQLitePCL.Ugly.ugly.step (SQLitePCL.sqlite3_stmt stmt) [0x00000] in <filename unknown>:0
at Couchbase.Lite.Shared.SqlitePCLRawStorageEngine.InsertWithOnConflict (System.String table, System.String nullColumnHack, Couchbase.Lite.Storage.ContentValues initialValues, ConflictResolutionStrategy conflictResolutionStrategy) [0x0005b] in /Users/borrrden/Development/couchbase-lite-net/src/Couchbase.Lite.Shared/Store/SqlitePclRawStorageEngine.cs:324
I see a release note for version 1.0 of couchbase lite that claims this (or a similar issue) was fixed, but am at a complete loss on how to trouble shoot this.