nolanlawson / cordova-plugin-sqlite-2

Native SQLite database API for Cordova/PhoneGap/Ionic, modeled after WebSQL (UNMAINTAINED)
https://nolanlawson.com/2016/04/10/introducing-the-cordova-sqlite-plugin-2/
Apache License 2.0
168 stars 28 forks source link

res.rows.length undefined when exceed 1000 #41

Closed alaaapp closed 6 years ago

alaaapp commented 8 years ago

Hi, First thank you for this great plugin, its helping me alot. The issue is described in the title. it's really strange...although i can get all data using LIMIT statement by slicing, any help? thx, Al

nolanlawson commented 8 years ago

Can you provide more detail or a test case to reproduce?

gevyaniv commented 7 years ago

Hello Nolan,

I am a big fan of your work and I wanted to thank you.

Maybe I can provide a few more details. I have been using this plugin for a while, and recently, while working with a big document in the DB, I got this error message

`Uncaught TypeError: Cannot read property 'length' of null cordova.js:314 safeJsonParse @ pouchdb.js:3979

(anonymous function) @ pouchdb.js:6865

(anonymous function) @ sqlite-plugin.js:4439

onSuccess @ sqlite-plugin.js:4741

callbackFromNative @ cordova.js:293

processMessage @ cordova.js:1081

processMessages @ cordova.js:1104

pollOnce @ cordova.js:973

pollOnceFromOnlineEvent @ cordova.js:960`

It seems like when reading a big document, the success callback is being called with empty result which causes this error.

This happens when I use the plugin with Android and works well on iOS.

I tried a different plugin and it worked, but I was really hoping this can be fixed since we have been using your plugin for a while and we prefer it.

I hope this helps

nolanlawson commented 6 years ago

Which version of Android? Also could be related to #39 .

nolanlawson commented 6 years ago

Closing old issues, please reopen if there is a test case or details that can reproduce this.

nolanlawson commented 6 years ago

also this may be the core issue: https://github.com/nolanlawson/cordova-plugin-sqlite-2/issues/46