[TIMOB-27430] EncryptedDB ResultSet field and fieldByName functions are returning incorrect values on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-10-15T17:10:46.000+0000 |
Affected Version/s | Release 8.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | encrypted_database, engSchedule, regression |
Reporter | Ryan Aston |
Assignee | Gary Mathews |
Created | 2019-08-28T20:52:57.000+0000 |
Updated | 2019-10-15T17:10:46.000+0000 |
Description
Calling .field() or .fieldByName() on an encrypteddatabase (3.0.4) ResultSet returns a boolean false if the value of the field is NULL. This issue seems to be isolated to this module on Android with the 8.1.0.GA SDK. 8.0.0.GA and iOS don't have this issue, nor does the built-in Ti.Database.ResultSet. A small sample project is linked below. Run this app on an Android device and see the discrepancies between the console log outputs for non-encDB and encDB. Running on iOS or switching back to 8.0.0.GA alleviates the discrepancy.
Sample project: https://drive.google.com/file/d/1HW1jxvUPZ67_HVx1Phe-PqgJKeVQygLp/view?usp=sharing
Hello, Tested the sample project shared by you with SDK 8.1.0.GA on android device 7. Got the following output on console:
Are you experiencing the same? Please share the console logs of your end.
Yes, that is exactly what my console log looks like. The last two lines should be identical to the two above them, but on Android with 8.1.0.GA they are not.
Hello, Can you please test the issue on 8.1.1.GA and share us the console logs.
The output is identical: {noformat} [INFO] Testing 1.0 (Powered by Titanium 8.1.1.0148ee6e79) [WARN] col fieldByName: null [WARN] col field: null [WARN] col fieldByName: false [WARN] col field: false {noformat}
Same with 8.2.0.GA: {noformat} [INFO] Testing 1.0 (Powered by Titanium 8.2.0.6bfdf6e394) [WARN] col fieldByName: null [WARN] col field: null [WARN] col fieldByName: false [WARN] col field: false {noformat} We really need this resolved quickly. It is preventing us from upgrading to these newer SDKs.
appcelerator.encrypteddatabase: https://github.com/appcelerator-modules/appcelerator.encrypteddatabase/pull/41
FR Passed.
Verified the fix with version 3.1.0. Closing.