{"action":"created","issue":{"url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage/issues/785","repository_url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage","labels_url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage/issues/785/labels{/name}","comments_url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage/issues/785/comments","events_url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage/issues/785/events","html_url":"https://github.com/litehelpers/Cordova-sqlite-storage/issues/785","id":321393300,"number":785,"title":"iOS, application needs to be put on pause (home button) few times for the DB to work","user":{"login":"amaka31","id":3924347,"avatar_url":"https://avatars3.githubusercontent.com/u/3924347?v=4","gravatar_id":"","url":"https://api.github.com/users/amaka31","html_url":"https://github.com/amaka31","followers_url":"https://api.github.com/users/amaka31/followers","following_url":"https://api.github.com/users/amaka31/following{/other_user}","gists_url":"https://api.github.com/users/amaka31/gists{/gist_id}","starred_url":"https://api.github.com/users/amaka31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaka31/subscriptions","organizations_url":"https://api.github.com/users/amaka31/orgs","repos_url":"https://api.github.com/users/amaka31/repos","events_url":"https://api.github.com/users/amaka31/events{/privacy}","received_events_url":"https://api.github.com/users/amaka31/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-09T00:45:28Z","updated_at":"2018-05-10T13:37:59Z","closed_at":"2018-05-10T13:37:59Z","author_association":"NONE","body":"Hi, i'm currently working on a Cordova app, but every time I deployed for iOS I have to open it, press the home button, open again (this a few times) and then the database starts to work. Here the logs:\r\n\r\nMy code: \r\nvar db = window.sqlitePlugin.openDatabase({name: \"XXXXXX.prueba3\", iosDatabaseLocation: 'default'});\r\n\r\nLOG:\r\n\r\n_2018-05-08 20:14:43.692286-0400 XXXXXX[797:138502] Apache Cordova native platform version 4.5.3 is starting.\r\n\r\n2018-05-08 20:14:43.693120-0400 XXXXXX[797:138502] Multi-tasking -> Device: YES, App: YES\r\n\r\n2018-05-08 20:14:43.842635-0400 XXXXXX[797:138502] Using UIWebView\r\n\r\n2018-05-08 20:14:43.845341-0400 XXXXXX[797:138502] [CDVTimer][console] 0.128984ms\r\n\r\n2018-05-08 20:14:43.845607-0400 XXXXXX[797:138502] [CDVTimer][handleopenurl] 0.162005ms\r\n\r\n2018-05-08 20:14:43.849300-0400 XXXXXX[797:138502] Unlimited access to network resources\r\n\r\n2018-05-08 20:14:43.849628-0400 XXXXXX[797:138502] [CDVTimer][intentandnavigationfilter] 3.955960ms\r\n\r\n2018-05-08 20:14:43.849838-0400 XXXXXX[797:138502] [CDVTimer][gesturehandler] 0.135064ms\r\n\r\n2018-05-08 20:14:43.868376-0400 XXXXXX[797:138502] [CDVTimer][statusbar] 18.442988ms\r\n\r\n2018-05-08 20:14:43.897962-0400 XXXXXX[797:138502] [CDVTimer][localstorage] 29.463053ms\r\n\r\n2018-05-08 20:14:43.898058-0400 XXXXXX[797:138502] [CDVTimer][TotalPluginStartup] 52.953005ms\r\n\r\n2018-05-08 20:14:43.978562-0400 XXXXXX[797:138562] libMobileGestalt MobileGestaltSupport.m:153: pid 797 (XXXXXX) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled\r\n\r\n2018-05-08 20:14:43.978660-0400 XXXXXX[797:138562] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)\r\n\r\n2018-05-08 20:14:47.108173-0400 XXXXXX[797:138502] Resetting plugins due to page load.\r\n\r\n2018-05-08 20:14:47.195656-0400 XXXXXX[797:138502] Finished load of: file:///var/containers/Bundle/Application/228D5D2D-272F-413D-83BF-E1E4120FCA0C/XXXXXX.app/www/index.html\r\n\r\n\r\nhere I press the home button\r\n------------------\r\n\r\n2018-05-08 20:14:51.134706-0400 XXXXXX[797:138502] -[SQLitePlugin pluginInitialize] [Line 29] Initializing SQLitePlugin\r\n\r\n2018-05-08 20:14:51.137838-0400 XXXXXX[797:138502] -[SQLitePlugin pluginInitialize] [Line 40] Detected docs path: /var/mobile/Containers/Data/Application/81027554-013A-41B3-8D6C-366CA7FDB600/Documents\r\n\r\n2018-05-08 20:14:51.138600-0400 XXXXXX[797:138502] -[SQLitePlugin pluginInitialize] [Line 44] Detected Library path: /var/mobile/Containers/Data/Application/81027554-013A-41B3-8D6C-366CA7FDB600/Library\r\n\r\n2018-05-08 20:14:51.139448-0400 XXXXXX[797:138502] -[SQLitePlugin pluginInitialize] [Line 51] no cloud sync at path: /var/mobile/Containers/Data/Application/81027554-013A-41B3-8D6C-366CA7FDB600/Library/LocalDatabase\r\n\r\n2018-05-08 20:14:51.146440-0400 XXXXXX[797:138502] OPEN database: XXXXXX.prueba3\r\n\r\n2018-05-08 20:14:51.146702-0400 XXXXXX[797:138502] new transaction is queued, waiting for open operation to finish\r\n\r\n2018-05-08 20:14:51.155203-0400 XXXXXX[797:138562] -[SQLitePlugin closeNow:] [Line 203] close: db name was not open: XXXXXX.prueba3\r\n\r\n2018-05-08 20:14:51.808542-0400 XXXXXX[797:138560] -[SQLitePlugin openNow:] [Line 141] open full db path: /var/mobile/Containers/Data/Application/81027554-013A-41B3-8D6C-366CA7FDB600/Library/XXXXXX.prueba3\r\n\r\n2018-05-08 20:14:51.823927-0400 XXXXXX[797:138560] -[SQLitePlugin openNow:] [Line 168] Good news: SQLite is thread safe!\r\n\r\n2018-05-08 20:14:52.820403-0400 XXXXXX[797:138502] OPEN database: XXXXXX.prueba3 - OK\r\n\r\n2018-05-08 20:14:52.820513-0400 XXXXXX[797:138502] DB opened: XXXXXX.prueba3\r\n\r\nhere I press the home button\r\n------\r\n\r\n2018-05-08 20:15:39.398259-0400 XXXXXX[797:138563] PBItemCollectionServicer connection disconnected.\r\n\r\nhere start to work._\r\n\r\n\r\nOn Android works perfectly. Thanks in advance!"},"comment":{"url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage/issues/comments/388055568","html_url":"https://github.com/litehelpers/Cordova-sqlite-storage/issues/785#issuecomment-388055568","issue_url":"https://api.github.com/repos/litehelpers/Cordova-sqlite-storage/issues/785","id":388055568,"user":{"login":"amaka31","id":3924347,"avatar_url":"https://avatars3.githubusercontent.com/u/3924347?v=4","gravatar_id":"","url":"https://api.github.com/users/amaka31","html_url":"https://github.com/amaka31","followers_url":"https://api.github.com/users/amaka31/followers","following_url":"https://api.github.com/users/amaka31/following{/other_user}","gists_url":"https://api.github.com/users/amaka31/gists{/gist_id}","starred_url":"https://api.github.com/users/amaka31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaka31/subscriptions","organizations_url":"https://api.github.com/users/amaka31/orgs","repos_url":"https://api.github.com/users/amaka31/repos","events_url":"https://api.github.com/users/amaka31/events{/privacy}","received_events_url":"https://api.github.com/users/amaka31/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T13:37:59Z","updated_at":"2018-05-10T13:37:59Z","author_association":"NONE","body":"Finally i found the issue... my bad, it was related to the Content-Security-Policy."}}
{"actor":{"display_login":"amaka31"}}