[MOD-2348] iOS: Encrypted Database upgrade-error when using Ti.Database
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2017-08-10T17:54:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Encrypted SQLite DB |
Labels | n/a |
Reporter | Victor Vazquez Montero |
Assignee | Christopher Williams |
Created | 2017-07-12T19:51:37.000+0000 |
Updated | 2017-08-10T17:55:08.000+0000 |
Description
Description
Customer upgraded to SDK 6.x from SDK 5.x and updated the SQLite Database Encryption modules from 1.3.1 to 2.0.2.
Since the upgrade they are running into the following errors:
error database is encrypted
file doesn't exist error
Since upgrading SDK's they had to open import the app in appcelerator which gave it a new GUID
Addition customer notes
App works perfectly fine on brand new install
only on upgrade this issue is happening.
App logs are provided previously. I am strongly suspecting that something has changed about DB password or database key that is causing this issue.
Things changed in the app is - App GUID got changed.
DB password in assets -> alloy -> sync -> enc.db.js is set to 'An excellent password can be used here, such as this string.';
and this has not changed in release.
steps to reproduce
* create an app and encrypt the database using version 1.3.1 SDK 5.x
* Upgrade to SDK 6.x and module version 2.0.2 ( at this step Appcelerator had them import the app which generated a new GUID for the application)
* Run database and get errors
Attachments
Old version of the application - 5.1 Appcelerator SDK 5.x Database version - 1.3.1 New version of the application 6.0 Appcelerator SDK 6.x Database version - 2.0.1
This has to be related to TIMOB-24488. The solution for the linked ticket was to update the library that caused the issue (PSPSFKit) to latest. They basically linked
-lsqlite3
in there library as well, which caused the trouble. When we use the Alloy-Sync API, Alloy will internally use Ti.Database, which may cause the same issue then. In addition to the proposal by [~cwilliams], I would like to see the.pbxproj
file generated with that patch. We should also test Ti.Database calls in general using the patch and the Encrypted-Database module. *EDIT 1*: Download [2.0.3 Beta 1](https://github.com/appcelerator-modules/appcelerator.encrypteddatabase/releases/tag/2.0.2-beta.1) *EDIT 2*: Why exactly did the GUID change? An SDK 5.x project should already have been registered with our platform, especially when using the encrypted database module. The GUID is used as the fallback password if the password is not set or set toDEFAULT
, so if the customer does either of those scenarios (not set or set to default), the changed GUID will cause the problems. But as I think that should not be the case, QE should validate the latest 2.0.3 draft (above) to validate the provided fix again. Thx!