[MOD-2443] Android: EncryptedDatabase error in Ti 7.1.1 using Android 8
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | appcelerator.encrypteddatabase 3.0.1 |
Fix Version/s | n/a |
Components | Encrypted SQLite DB |
Labels | n/a |
Reporter | Alex Warnes |
Assignee | Joshua Quick |
Created | 2018-07-26T22:52:54.000+0000 |
Updated | 2018-07-30T21:13:21.000+0000 |
Description
We have been receiving reports from various users primarily on Android 8.0 with a run time error that prevents them from using our app (please see attached screenshot). Unfortunately, we have been unable to reproduce this error _organically_ in our testing over the past six weeks. Due to this inability to reproduce the error we have been flying blind as to what is causing the error and hence what could fix the error. However, in our testing we were able to reproduce the error by intentionally breaking the system. When we forced the app to look at the default _alloy_ database, we saw the same error message. It appears that when this database is fed into the appcelerator.encrypteddatabase module it will crash since they are looking for different types of information. In order to fix this we allowed the app to use the unencrypted database if it was going to break: Our enc.db.js file in the Migrate function:
if (OS_ANDROID && config.adapter.db_name === ALLOY_DB_DEFAULT) {
_database = Ti.Database
}
if (typeof targetNumber === 'undefined' || targetNumber === null) {
var tmpDb = _database.open(config.adapter.db_name);
}
This has not solved the issue. Our next step is to modify the _database.open() call as follows:
if (typeof targetNumber === 'undefined' || targetNumber === null) {
var tmpDb = _database.open(config.adapter.db_name || 'fallback'); // Give it a name if none comes from the config.adapter.db_name.
}
If this fails our next step is to remove the encrypteddatabase module entirely. Any insight would be appreciated. As mentioned above, we have been unable to reproduce this issue ourselves.
* Have there been similar reports?
* Is there a preferred way to handle the changes we're looking at?
* Is there any documentation relating to the encrypteddatabase module?
Thank you for your help!
Attachments
File | Date | Size |
---|---|---|
AndroidErrorScreenshot.jpg | 2018-07-26T22:51:02.000+0000 | 259573 |