NEW287876
failed to delete record from object store when doing IDBObjectStore.put
https://bugs.webkit.org/show_bug.cgi?id=287876
Summary failed to delete record from object store when doing IDBObjectStore.put
singpolyma
Reported 2025-02-18 11:59:31 PST
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 "failed to delete record from object store" Here is part of the code I use to confirm the error happens on any put: testStore: function() { const tx = db.transaction(["keyvaluepairs"], "readwrite"); const store = tx.objectStore("keyvaluepairs"); this.testCounter = (this.testCounter || 0) + 1; const req = store.put(this.testCounter, "test"); req.onerror = () => { window.mylog.push("TEST STORE ERROR: " + req.error.name + " " + req.error.message); } tx.onerror = () => { window.mylog.push("TEST TX ERROR"); } tx.onabort = () => { window.mylog.push("TEST TX ABORT"); } } 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't think any of them should be hit in normal operation?
Attachments
singpolyma
Comment 1 2025-02-19 18:19:57 PST
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't see this error anymore, but after some time I see instead "Unable to store record in object store" (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.
Radar WebKit Bug Importer
Comment 2 2025-02-25 12:00:21 PST
Note You need to log in before you can comment on or make changes to this bug.