{ "id": "108083", "key": "TIMOB-12466", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-01-18T06:53:28.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "ios", "opendatabase", "webview" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:51.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Summary of issue:\r\n\r\nIf you build a simple Titanium mobile application that contains a WebView which has in it javascript that opens a local database, the first time you install it to an iOS 5.1 device it will open the database correctly. However, if you then upgrade the app on the device (it can still be the exact same version/build), it will error when opening the local database:\r\n\r\nSECURITY_ERR: DOM Exception 18\r\n\r\nSteps to reproduce:\r\n\r\n1. Add the app.js and database.html files below to the root of Resources.\r\n2. Install app to iOS 5.1 device (Run > iOS Device in Ti Studio).\r\n3. Open app, it will say \"db opened\".\r\n4. Upgrade app on iOS 5.1 device (Run > iOS Device in Ti Studio).\r\n5. Open app, it will say \"db opening failed: Error: SECURITY_ERR: DOM Exception 18\".\r\n\r\nHere is the code to reproduce:\r\n\r\napp.js:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({});\r\nvar webView = Ti.UI.createWebView({\r\n\ttop : 0, right : 0, bottom : 0, left : 0, url: 'database.html'\r\n});\r\nwin.add(webView);\r\nwin.open();\r\n{code}\r\n\r\ndatabase.html:\r\n\r\n{code}\r\n\r\n\r\n\t
\r\n \t