SQLite plugin forgetting data

Thread is closed for posting
2 posts, 0 answers
  1. Steve
    Steve avatar
    7 posts
    Member since:
    Oct 2013

    Posted 07 Apr 2016 Link to this post


    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

  2. Dimitar Kerezov
    Dimitar Kerezov avatar
    15 posts

    Posted 12 Apr 2016 Link to this post

    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.

    Dimitar Kerezov

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

Back to Top