Bug 287876
| Summary: | failed to delete record from object store when doing IDBObjectStore.put | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | singpolyma |
| Component: | Website Storage | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | cdumez, marcosc, sihui_liu, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 18 | ||
| Hardware: | Unspecified | ||
| OS: | iOS 18 | ||
| Bug Depends on: | |||
| Bug Blocks: | 165889 | ||
singpolyma
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
singpolyma
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
<rdar://problem/145589809>