<?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>287876</bug_id>
          
          <creation_ts>2025-02-18 11:59:31 -0800</creation_ts>
          <short_desc>failed to delete record from object store when doing IDBObjectStore.put</short_desc>
          <delta_ts>2026-01-25 21:43:55 -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>Website Storage</component>
          <version>Safari 18</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>iOS 18</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>165889</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>singpolyma</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cdumez</cc>
    
    <cc>marcosc</cc>
    
    <cc>sihui_liu</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2095527</commentid>
    <comment_count>0</comment_count>
    <who name="">singpolyma</who>
    <bug_when>2025-02-18 11:59:31 -0800</bug_when>
    <thetext>I have this as an intermittent (but common) bug happening under iOS 18 PWA. After some time any put operation against my IDBObjectStore produces the error &quot;failed to delete record from object store&quot;

Here is part of the code I use to confirm the error happens on any put:

testStore: function() {
	const tx = db.transaction([&quot;keyvaluepairs&quot;], &quot;readwrite&quot;);
	const store = tx.objectStore(&quot;keyvaluepairs&quot;);
	this.testCounter = (this.testCounter || 0) + 1;
	const req = store.put(this.testCounter, &quot;test&quot;);
	req.onerror = () =&gt; { window.mylog.push(&quot;TEST STORE ERROR: &quot; + req.error.name + &quot; &quot; + req.error.message); }
	tx.onerror = () =&gt; { window.mylog.push(&quot;TEST TX ERROR&quot;); }
	tx.onabort = () =&gt; { window.mylog.push(&quot;TEST TX ABORT&quot;); }
}

once I start to see the error happening on other puts, even executing this simple code produces the same error.

This error seems to come from the https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp#L1600 method but there are several paths in there which produce it, and I don&apos;t think any of them should be hit in normal operation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2096174</commentid>
    <comment_count>1</comment_count>
    <who name="">singpolyma</who>
    <bug_when>2025-02-19 18:19:57 -0800</bug_when>
    <thetext>I have a piece of my app which will write to the same IDB key every second or two. If I remove that then I don&apos;t see this error anymore, but after some time I see instead &quot;Unable to store record in object store&quot; (seemingly from https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp#L1846 ) on a different code path on a different IDBObjectStore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2097887</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-02-25 12:00:21 -0800</bug_when>
    <thetext>&lt;rdar://problem/145589809&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>