CouchbaseLite and Good Dynamics on iOS

81 views
Skip to first unread message

Andrew

unread,
Feb 15, 2015, 8:21:03 AM2/15/15
to mobile-c...@googlegroups.com
Hi,

I have built a hybrid iOS app using CouchbaseLite Cordova plugin recently. Everything was working fine until we introduced Good Dynamics secure container into the mix. No all of a sudden all of Couchbase stopped working.

I am seeing Good Dynamics intercept http calls from the UIWebView and not allowing them to proceed or so it seems.

What is the current compatibility status between Good Dynamics and CouchbaseLite please ???

Thanks for any information on this topic.

Best,
Andrew

Andrew

unread,
Feb 15, 2015, 8:45:15 AM2/15/15
to mobile-c...@googlegroups.com
Some errors on database creation we are seeing:

500 - on db creation - no detail information in http response .. only "Database error!" message.

Error calling sqllite3_step (1: no such module: rtree) SQLLITE_ERROR
DB Query: CREATE VIRTUAL TABLE bboxes USING rtree(rowid, x0, x1, y0,y1)
Warning CBLDatabase: Could not initialize the schema of - <path> - May be old/incompatible format. SQLLite error: no such module rtree

Jens Alfke

unread,
Feb 15, 2015, 1:55:38 PM2/15/15
to mobile-c...@googlegroups.com

On Feb 15, 2015, at 5:45 AM, Andrew <andrzej....@gmail.com> wrote:

Error calling sqllite3_step (1: no such module: rtree) SQLLITE_ERROR

Sounds like some other component has linked in a custom build of SQLite, instead of using the dynamic library in the OS, and their SQLite build doesn’t include features that Couchbase Lite expects.

From the term “secure container” I’m guessing the other component uses SQLCipher, which is a variant of SQLite that adds encryption. It’s possible to modify the build configuration of SQLCipher to enable RTrees and full-text indexing (both of which Couchbase Lite uses) but you have to rebuild it from source.

—Jens

Andrzej Porebski

unread,
Feb 15, 2015, 2:01:48 PM2/15/15
to mobile-c...@googlegroups.com
Thanks for responding Jens. Would you be able to provide some sort of a SQLLite feature/module list that Couchbase is depending upon so I can send to vendor for verification?

--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/dPvTcOXAkg4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/5B9BFAC6-7D58-4206-8752-900E19B52C7A%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.



--
Thx,
Andrzej

Andrew

unread,
Feb 15, 2015, 4:15:18 PM2/15/15
to mobile-c...@googlegroups.com
Jens, I double-checked the project in Xcode and standard libsqlite3.dylib is used. Vendor provides their framework which is included in the project as well. It does not look like a custom build of sqllite is used ??

Jens Alfke

unread,
Feb 16, 2015, 12:32:13 AM2/16/15
to mobile-c...@googlegroups.com

On Feb 15, 2015, at 11:01 AM, Andrzej Porebski <andrzej....@gmail.com> wrote:

Thanks for responding Jens. Would you be able to provide some sort of a SQLLite feature/module list that Couchbase is depending upon so I can send to vendor for verification?

At least SQLite 3.7, and it needs the rtree and fts3 modules enabled.

Jens, I double-checked the project in Xcode and standard libsqlite3.dylib is used. Vendor provides their framework which is included in the project as well. It does not look like a custom build of sqllite is used ??

I’ll bet the other framework/library includes a custom build of SQLite. If the “sqlite3_” symbols are found in that library, the linker will use those instead of the dylib, even if the project includes the dylib in its link instructions. And if you did make the app link against the dylib instead, the other module would break because it’s expecting functionality not found in the dylib.

—Jens

Andrew

unread,
Feb 19, 2015, 9:31:00 AM2/19/15
to mobile-c...@googlegroups.com
Vendor will not change their implementation which essentially renders our CouchbaseLite approach useless. We will probably have to use PouchDB which seems to be working with their SQLLite Cordova Plugin as storage adapter..

Thanks for responding and information Jens. Much appreciated.

Andrew

Jens Alfke

unread,
Feb 19, 2015, 11:36:38 AM2/19/15
to mobile-c...@googlegroups.com

On Feb 19, 2015, at 6:30 AM, Andrew <andrzej....@gmail.com> wrote:

Vendor will not change their implementation which essentially renders our CouchbaseLite approach useless. We will probably have to use PouchDB which seems to be working with their SQLLite Cordova Plugin as storage adapter..

If you’re willing to rebuild Couchbase Lite, you could delete the two lines in CBLDatabase_Internal.m that create the fts4 and rtree-based tables; that would make CBL work with their build of SQLCipher, unless of course you tried to use the full-text or geo-query APIs. (I can point you to the exact line numbers.)

Yesterday I committed a change that defers creating those tables until they’re needed, which also fixes the issue, but the master branch is fairly unstable right now due to a lot of recent architectural changes, so I wouldn’t recommend using that.

—Jens
Reply all
Reply to author
Forward
0 new messages