{"action":"closed","issue":{"url":"https://api.github.com/repos/axemclion/IndexedDBShim/issues/111","labels_url":"https://api.github.com/repos/axemclion/IndexedDBShim/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/axemclion/IndexedDBShim/issues/111/comments","events_url":"https://api.github.com/repos/axemclion/IndexedDBShim/issues/111/events","html_url":"https://github.com/axemclion/IndexedDBShim/issues/111","id":27611785,"number":111,"title":"Database failing to initialise or ObjectStores not being created (Android 4.2.2 and 4.1.2) using PhoneGap Build","user":{"login":"baroquedub","id":316458,"avatar_url":"https://avatars.githubusercontent.com/u/316458?v=3","gravatar_id":"","url":"https://api.github.com/users/baroquedub","html_url":"https://github.com/baroquedub","followers_url":"https://api.github.com/users/baroquedub/followers","following_url":"https://api.github.com/users/baroquedub/following{/other_user}","gists_url":"https://api.github.com/users/baroquedub/gists{/gist_id}","starred_url":"https://api.github.com/users/baroquedub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baroquedub/subscriptions","organizations_url":"https://api.github.com/users/baroquedub/orgs","repos_url":"https://api.github.com/users/baroquedub/repos","events_url":"https://api.github.com/users/baroquedub/events{/privacy}","received_events_url":"https://api.github.com/users/baroquedub/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-02-14T17:33:55Z","updated_at":"2015-04-14T22:21:12Z","closed_at":"2015-04-14T22:21:12Z","body":"I'm trying the code example at http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap.html\r\n\r\nWorks fine using PhoneGap Build (2.9.0) running on both a Nexus 5 and Nexus 7 (both Android 4.4.2) However on my other two devices Acer A1-810 (android 4.2.2) and Galaxy S2 (android 4.1.2) the data doesn't appear in the HTML tables. I'm unsure whether the database is failing to initialise or the ObjectStores are not being created.\r\n\r\nI've tried updating IndexedDBShim to the latest version here on Github (v0.1.2 - 2014-01-30) but the same problem occurs. I've tried increasing the timeout before initDB() is called to 2 seconds and also, strangely, I see no error messages:\r\n\r\nI've tried the original code in the demo:\r\n...\r\n}).then(function(){\r\n window.setTimeout(function(){\r\n    loadFromDB(\"cart\");\r\n    loadFromDB(\"wishlist\");\r\n    downloadCatalog();\r\n   }, 400);\r\n}, function(){\r\n   alert(\"Looks like an error occured \" + JSON.stringify(arguments))\r\n});\r\n\r\nNo error is generated and the \"doing 'then' function...\" alert appears (but no data is populated in the tables.\r\n\r\nAnd I've tried to use promise done/fail code instead:\r\n...\r\n}).done(function(){\r\n  window.setTimeout(function(){\r\n     loadFromObjectStore(\"cart\");\r\n     loadFromObjectStore(\"wishlist\");\r\n     downloadCatalog();\r\n   }, 400);\r\n}).fail(function(){\r\n   alert(\"failed in initDB\");\r\n}).always(function(){\r\n   alert(\"always called\");\r\n});\r\n\r\nHere, \"always called\" appears as expected but so does \"doing 'done' function...\" - no failure is reported.\r\n\r\nAny advice on what is going wrong and how to further debug in the device would be much appreciated!"}}