2016-05-20 18:14:47.225 SGNews[6944:187465] OPEN database: _pouch_laMatinaleDB
2016-05-20 18:14:47.225 SGNews[6944:187465] new transaction is waiting for open operation
2016-05-20 18:14:47.227 SGNews[6944:187495] Good news: SQLite is thread safe!
2016-05-20 18:14:47.230 SGNews[6944:187465] DB opened: _pouch_laMatinaleDB
This is telling me that the database was opened, but I have no return from the promise. This makes my app blocked, even my spinner is not moving.
To reproduce this issue, I open and close my app until I get it.
I know that is a pretty awful way, but some people who use it normally have the same problem.
I use the 5.3.2 release version of PouchDB. (Everything is great on Android)
Are you using the SQLite plugin? If so, make sure your not making calls to the DB before $ionicPlatform.ready. You may be creating a race condition where the plugin is not yet initialized when you make the first query.
They told me to look after location and iosDatabaseLocation options. After reading more about it, I found that location for iOS is still available even if it’s deprecated. So, I think there is some troubles when you set location and iosDatabaseLocation in the same options. I did this in order to not have to test the platform and just have one line of code for opening my database.
After I separate the location and iosDatabaseLocation, it seems to be great.
That wasn’t really a good answer. Even if the results are better, It’s not concluant.
I’m waiting for almost 5 seconds after the deviceready event to be sure to not freeze my app.
Hi,
I m stuck with same issue as mentioned above, since from week,anyone please help me
I’m working on an ionic1 app…
I’m currently having trouble with the iOS version.
and iam using cordova sqlite plugin,and here db is getting opened but cordovasqlite.execute function(), not working instead iam getting error code:5,message:"no such table:table-name"
for opening database iam using,
if(ionic.Platform.isIOS())
{
console.log(‘database is iso’);
var db = $cordovaSQLite.openDB({name: ‘olarcniapp.db’, iosDatabaseLocation: ‘Library’}); //ios device
}
else
{
console.log('database is android');
var db = $cordovaSQLite.openDB({name:'olarcniapp.db',location:'default'}); // android device
}
Hi ,
Thank you for your response, how to add transaction for select insert queries, here iam doing seperate service for select and insert, my code looks like this,