This is a migrated thread and some comments may be shown as answers.

SQLite plugin forgetting data

1 Answer 72 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steve
Top achievements
Rank 1
Steve asked on 07 Apr 2016, 11:09 AM

Hi,

I have an app that uses the brodysoft SQLite plugin 1.1.0  and 

 

In Cordova 3.5.0 all is fine, except Google play won't accept these shortly due to security concerns.  Also the barcode scanner is buggy (sometimes very very slow to return barcodes (up to 30 seconds))

in Cordova 4.0.0 & 5.0.0 the barcode scanner works fine (with exactly the same code).  However I have an unacceptable issue with the SQLite plugin whereby every now and again the database will just forget everything that was saved in the last session.   I have never managed to recreate this at my end, but it has happened enough times "out in the field" to know it's a real issue.  What happens is 

1.Launch app and it initialises the database and all is fine.

2. Update table rows, insert data etc like normal.  Some of these updates involve large amounts of data being stored in table records (base64encoded images).

3. At some point the database will fail to initialise. 

4. If they reload the app the database will fail to initialise.

5. After restarting the tablet the app will now load and the database will initialise but it will be in the state it was in before the last 'session' and will have lost all the data added since the app was started previously.

 

Has anyone else experienced anything like this?  does it even make sense? surely the db is a file of some sort and not simply held in memory??  I can live with the occasional crash,  but losing data is unacceptable.  I really want to avoid backing up data to files but looks like i may have no choice.

 

any help greatly appreciated

1 Answer, 1 is accepted

Sort by
0
Dimitar Kerezov
Telerik team
answered on 12 Apr 2016, 10:02 AM
Hello Steve,

Based on your statements I suspect you have come across this bug in the SQLite Cordova plugin. Although this is still an open issue, there is a suggested workaround you could try. Be advised however that the plugin's author has stated in the related issue that this may well be a bug in the Android database libraries and not in the plugin itself.

Apart from the above workaround, I can suggest trying the plugin's free enterprise edition as a custom plugin or any of the plugin's other alternatives.

Please, let me know if this helps.

Regards,
Dimitar Kerezov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Report a bug
Asked by
Steve
Top achievements
Rank 1
Answers by
Dimitar Kerezov
Telerik team
Share this question
or