<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>140443</bug_id>
          
          <creation_ts>2015-01-14 08:54:29 -0800</creation_ts>
          <short_desc>openDatabase intermittently triggers SecurityError: DOM Exception 18 in Chrome on iOS</short_desc>
          <delta_ts>2015-06-22 08:08:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 8.1</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>137760</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John David Eriksen">jkndrkn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mcatanzaro</cc>
    
    <cc>nolan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1061184</commentid>
    <comment_count>0</comment_count>
    <who name="John David Eriksen">jkndrkn</who>
    <bug_when>2015-01-14 08:54:29 -0800</bug_when>
    <thetext>Greetings, I have an application that depends on WebSQL on Chrome iOS.

The openDatabase method intermittently throws SecurityError: DOM Exception 18.

I am using Chrome version 39.0.2171.50 and iOS 8.1 running on an iPhone 5s. My team has also seen this error appear on iPhone 5 and the PouchDB team has seen it appear in their automated tests for iPhone [1].

Here is a test case that exposes the bug:

    http://bl.ocks.org/jkndrkn/fd0074554047c3c0d8ac

Here is the specific code segments from the above test case that trigger the bug:

   var db = openDatabase(&apos;mydatabase&apos;, 1, &apos;mydatabase&apos;, 50000000);
   var db = openDatabase(&apos;mydatabase&apos;, &apos;1&apos;, &apos;mydatabase&apos;, 50000000);

The bug is _intermittent_, so it doesn&apos;t always appear. Sometimes it appears right away, sometimes it takes refreshing the page, clearing all browser data, and force-quitting and restarting the browser in some combination. I am not sure what specific situations result in triggering this bug. I do know that refreshing the page does not make the exception go away once it has been expressed. However, force-quitting the browser *does* make the exception go away.

[1]: https://travis-ci.org/pouchdb/pouchdb/jobs/46726739#L1173

Thank you for your help with this issue.

John David</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1061192</commentid>
    <comment_count>1</comment_count>
    <who name="Nolan Lawson">nolan</who>
    <bug_when>2015-01-14 09:09:17 -0800</bug_when>
    <thetext>I have a similar demo that causes a DOM Exception 11 in Chrome for iOS. Not sure if it&apos;s related to the DOM Exception 18 issue, but it might be: http://bl.ocks.org/nolanlawson/2cf0c9839ea8b64439ba

For some context, we are tracking this issue in PouchDB as well: https://github.com/pouchdb/pouchdb/issues/3382</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1066147</commentid>
    <comment_count>2</comment_count>
    <who name="Nolan Lawson">nolan</who>
    <bug_when>2015-02-02 10:51:31 -0800</bug_when>
    <thetext>I can no longer repro. I&apos;m using Chrome 40.0.2214.69 in iOS 8.1.3 on an iPhone 6 Plus.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1067885</commentid>
    <comment_count>3</comment_count>
    <who name="John David Eriksen">jkndrkn</who>
    <bug_when>2015-02-09 12:40:58 -0800</bug_when>
    <thetext>I also can no longer reproduce on my iPhone 5 running iOS 8.1.3 and Chrome 40.X.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1103839</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2015-06-22 08:08:19 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 137760 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>