Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9221379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:34:02+00:00 2026-06-18T03:34:02+00:00

If you build a simple Titanium mobile application that contains a WebView which has

  • 0

If 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:

SECURITY_ERR: DOM Exception 18

Steps to reproduce:

  1. Add the app.js and database.html files below to the root of Resources.
  2. Install app to iOS 5.1 device (Run > iOS Device in Ti Studio).
  3. Open app, it will say “db opened”.
  4. Upgrade app on iOS 5.1 device (Run > iOS Device in Ti Studio).
  5. Open app, it will say “db opening failed: Error: SECURITY_ERR: DOM Exception 18”.

Here is the code to reproduce:

app.js:

var win = Ti.UI.createWindow({});
var webView = Ti.UI.createWebView({
    top : 0, right : 0, bottom : 0, left : 0, url: 'database.html'
});
win.add(webView);
win.open();

database.html:

<!DOCTYPE HTML>
<html>
    <head>
        <title>db test</title>
        <script>
            window.onload = function () {
                var dbConn;
                try {
                    dbConn = openDatabase('test', '0.1', 'test database', 5 * 1024 * 1024);
                    alert('db opened');
                } catch (e) {
                    alert('db opening failed: ' + e.toString());
                }
            };
        </script> 
    </head>
    <body>
        db test
    </body>
</html>

This issue seems to be the same as Apache Cordova has had and fixed.

https://issues.apache.org/jira/browse/CB-347

Has anyone else run into this issue? Any ideas for a work-around?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:34:03+00:00Added an answer on June 18, 2026 at 3:34 am

    We ended up creating a custom webview module for iOS to fix the issue ourselves, as who knows how long it’ll take before Titanium does the same:

    Webview Module Source

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I build a simple application to test the sleep option of the android mobile
Scenario: I build a simple web based app for mobile that needs to interact
I try to build simple Java EE application that uses JPA + EJB3 and
I want to build simple camel application, which will get xml from URL and
I build a simple application by using Titanium Studio. From normal window, when I
I need to build a simple, single user database application for Windows. Main requirements
i want to build a simple CRUD console application which consists of a set
I'm working on something of a wizard-type application to allow users to build simple
When trying to build a simple test program that uses atomic operations, I get
I want to build a simple application with the MVVM pattern. This application will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.