<?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>171049</bug_id>
          
          <creation_ts>2017-04-20 02:34:08 -0700</creation_ts>
          <short_desc>IndexedDB open request is always in pending state</short_desc>
          <delta_ts>2022-02-01 10:07:58 -0800</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>WebKit Nightly Build</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>224623</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=226547</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Karimov">krassx</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>janturon</cc>
    
    <cc>sihui_liu</cc>
    
    <cc>simontaylor1</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1299079</commentid>
    <comment_count>0</comment_count>
      <attachid>307581</attachid>
    <who name="Alexey Karimov">krassx</who>
    <bug_when>2017-04-20 02:34:08 -0700</bug_when>
    <thetext>Created attachment 307581
Test page that fails

Recently found a problem that prevents IndexedDB from being opened. I attached the page that is used to test it. It works in all browsers I tested: Chrome, Firefox, Opera except Safari 10.1, Tech Preview and latest available Webkit Nightly build.

After calling indexedDB.open() I receive an instance of IDBOpenDBRequest which is always pending. It never fires any of the attached event handlers.

The problem here is that it happens only on specific pages/domains. E.g. if I open, say apple.com and try that code there everything is fine. But if I try it locally (with http://localhost:3000) I get this weird behavior. Moreover, when I try it with our dev domain (which is HTTPS with valid cert) I also get this pending state). I tried creating plunker to reproduce it, but it works there.

Here is what I see in console for it: https://gyazo.com/ac66d231dd7c03e4bdc5745c5f79012e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300074</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-04-21 19:32:25 -0700</bug_when>
    <thetext>Works for me as attached to this bug. Would this reproduce for you in the same way from a new user account?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300109</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Karimov">krassx</who>
    <bug_when>2017-04-21 21:28:05 -0700</bug_when>
    <thetext>New user account works. But fails the same way in my current account.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300125</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2017-04-21 22:27:18 -0700</bug_when>
    <thetext>This likely means that it is something about your existing IndexedDB database file on disk that&apos;s causing the issue, so this is going to be a challenging bug to investigate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300127</commentid>
    <comment_count>4</comment_count>
    <who name="Alexey Karimov">krassx</who>
    <bug_when>2017-04-21 22:30:48 -0700</bug_when>
    <thetext>Well, it&apos;s quite reproducible. Two of my colleagues have similar issues with the same domain and DB. Let me know if any info is required.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1300515</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2017-04-24 08:59:41 -0700</bug_when>
    <thetext>(In reply to Alexey Karimov from comment #4)
&gt; Well, it&apos;s quite reproducible. Two of my colleagues have similar issues with
&gt; the same domain and DB. Let me know if any info is required.

I&apos;ve tried to reproduce and have not been able to, so yes; more info is required.

E.g., attaching the relevant database files from ~/Library/Safari(TechnologyPreview)/Databases/___IndexedDB/ that would get us into the reproducible state.

(of course this means you&apos;ll be attaching the contents of those files, as well, so be aware of that)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1753055</commentid>
    <comment_count>6</comment_count>
    <who name="Jan Turoň">janturon</who>
    <bug_when>2021-04-21 23:38:54 -0700</bug_when>
    <thetext>I managed to reproduce this behavior when I opened indexedDB with higher version and opened DB connection was hanging in another tab. The pending request was done as soon as the other tab was closed or the connection was closed there. Doesn&apos;t seem like a bug: it makes sense that it waits for other connections to close.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1753217</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-04-22 10:44:04 -0700</bug_when>
    <thetext>&lt;rdar://problem/77026605&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1766308</commentid>
    <comment_count>8</comment_count>
    <who name="Simon Taylor">simontaylor1</who>
    <bug_when>2021-06-03 01:01:13 -0700</bug_when>
    <thetext>The issue title perfectly describes behaviour I&apos;ve observed on iOS 14.6, but appears to be a different bug, so I added a new one - bug 226547.

That one is very readily reproducible, doesn&apos;t depend on the current user state (still occurs after clearing website data) and definitely isn&apos;t caused by being blocked on another tab as suggested in comment 6.

Mentioning here as I figured it&apos;s probably of interest to people cc&apos;ed on this bug too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1836036</commentid>
    <comment_count>9</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-02-01 10:07:58 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 224623 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>307581</attachid>
            <date>2017-04-20 02:34:08 -0700</date>
            <delta_ts>2017-04-20 02:34:08 -0700</delta_ts>
            <desc>Test page that fails</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>1117</size>
            <attacher name="Alexey Karimov">krassx</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICAgIDxiYXNlIGhyZWY9Ii8iPgogICAgPG1l
dGEgY2hhcnNldD0idXRmLTgiPgogICAgPHRpdGxlPlRlc3Q8L3RpdGxlPgo8L2hlYWQ+Cjxib2R5
PgoKPHNjcmlwdD4KICAgICgoKSA9PiB7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgY29uc3Qg
ZGJSZXF1ZXN0ID0gd2luZG93LmluZGV4ZWREQi5vcGVuKCJ0ZXN0ZGIiLCAxKTsKCiAgICAgICAg
ICAgIGRiUmVxdWVzdC5hZGRFdmVudExpc3RlbmVyKCdzdWNjZXNzJywgKC4uLmFyZ3MpID0+IGNv
bnNvbGUubG9nKGFyZ3MpKTsKICAgICAgICAgICAgZGJSZXF1ZXN0Lm9uc3VjY2VzcyA9ICguLi5h
cmdzKSA9PiBjb25zb2xlLmxvZyhhcmdzKTsKCiAgICAgICAgICAgIGRiUmVxdWVzdC5hZGRFdmVu
dExpc3RlbmVyKCdibG9ja2VkJywgKC4uLmFyZ3MpID0+IGNvbnNvbGUubG9nKGFyZ3MpKTsKICAg
ICAgICAgICAgZGJSZXF1ZXN0Lm9uYmxvY2tlZCA9ICguLi5hcmdzKSA9PiBjb25zb2xlLmxvZyhh
cmdzKTsKCiAgICAgICAgICAgIGRiUmVxdWVzdC5hZGRFdmVudExpc3RlbmVyKCd1cGdyYWRlbmVl
ZGVkJywgKC4uLmFyZ3MpID0+IGNvbnNvbGUubG9nKGFyZ3MpKTsKICAgICAgICAgICAgZGJSZXF1
ZXN0Lm9udXBncmFkZW5lZWRlZCA9ICguLi5hcmdzKSA9PiBjb25zb2xlLmxvZyhhcmdzKTsKCiAg
ICAgICAgICAgIGRiUmVxdWVzdC5hZGRFdmVudExpc3RlbmVyKCdlcnJvcicsICguLi5hcmdzKSA9
PiBjb25zb2xlLmxvZyhhcmdzKSk7CiAgICAgICAgICAgIGRiUmVxdWVzdC5vbmVycm9yID0gKC4u
LmFyZ3MpID0+IGNvbnNvbGUubG9nKGFyZ3MpOwoKICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9
PiB7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhkYlJlcXVlc3QpOwogICAgICAgICAgICAg
ICAgLy8gY29uc29sZS5sb2coZGJSZXF1ZXN0LmVycm9yKTsKICAgICAgICAgICAgICAgIC8vIGNv
bnNvbGUubG9nKGRiUmVxdWVzdC5yZXN1bHQpOwogICAgICAgICAgICB9LCA1MDAwKTsKICAgICAg
ICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKGUpOwogICAgICAgIH0KICAg
IH0pKCk7Cjwvc2NyaXB0PgoKPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>