Question

This error does not happen anywhere else. I can even open a version database (and then another imaginary test database) with no problem. But as soon as I go to open the main database I get the error.

The process I have been using is to get the version from the version database and if that fails try a range of versions above and below what that version was. I do this because if there is a crash somewhere during my open process the version number can get messed up or the db can go into a bad state on a particular version (I think that's what's happening anyway).

var myDB =openDatabase("Todo", "1.0", "Todo manager", dbSize); // gives SECURITY_ERR: DOM exception 18 on Android only 

I think the problem is due to one of the following: 1. im using the wrong version the first time and android always fails if you miss it the first time. 2. even though i am clearing history and cache in settings (only place i can find to clear anything) it actually isn't deleting the database. 3. maybe there actually is some type of security error?!

That's it. I have no code for you. My code is a 3000 line js file that turns the hodge podge of unsuported heterogeneous offline databases into a single thing. I'm just looking for some general ideas about what could possibly be going wrong.

Was it helpful?

Solution

I'm using a webSql wrapper called lawnchair on our android tables and when we upgraded our tablet from android 3 to android 4 our app stopped working on android 4 with the same error you describe and on the same line (opening the database). However on our android 3 tablet it still worked as expected.

The solution i discoverd is really stupid but after shutting down our recently upgraded tablet and restarting it the websql worked again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top