You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-09-21] [Onyx] Investigate ConstraintError: Key already exists in the object store storage error #100047
add() fails if the key already exists; put() overwrites. Between the read and the write nothing reserves the key, so two runs at once (two tabs, or two calls in one tab) both take the add() branch, and the second one fails with ConstraintError: Key already exists in the object store. Nothing catches the rejection, so it reaches window.onunhandledrejection — our Sentry handler — and gets filed against our project.
Why it is not Onyx:
Onyx's IndexedDB provider only uses put, delete, get, clear. There is no add() in onyx 3.0.101 or in idb-keyval.
Chromium prints "Key already exists in the object store." only for add(). Checked in a real browser: add() on an existing key gives that exact message, put() on the same key succeeds, and the error carries no stack — which matches the missing stacktrace and DOMException.code: 0 on the Sentry events.
We already filter a sibling error from the same script. setupSentry.ts ignores Non-Error promise rejection captured with value: No data found for key, with a comment naming the Convert script.
Proposed fix, same pattern as that one: add ConstraintError: Key already exists in the object store. to ignoreErrors in setupSentry.ts. thirdPartyErrorFilterIntegration cannot handle it, because the error has no stack frames to tag. Onyx never calls add(), so no real Onyx failure is hidden, and genuine storage errors still reach our logs.
The add() → put() change itself sits in vendor code, so it needs a ticket to Convert. Tracking that separately.
Hi! I will fill in for @elirangoshen here. @mountiny I was told you are the one to reach out to for the PR review. Let me know what you think aobut the proposed solution. Thanks!
changed the title [-][Onyx] Investigate `ConstraintError: Key already exists in the object store` storage error[/-][+][Due for payment 2026-09-21] [Onyx] Investigate `ConstraintError: Key already exists in the object store` storage error[/+]on Sep 21, 2026
Activity
elirangoshen commentedon Sep 2, 2026
Hi I investigated and its not an Onyx bug. It comes from Convert Experiences, the third-party A/B testing service we load on every web page:
Their SDK keeps its own IndexedDB database (
convert, storesconfigandsignals) and inserts rows withadd()instead ofput():add()fails if the key already exists;put()overwrites. Between the read and the write nothing reserves the key, so two runs at once (two tabs, or two calls in one tab) both take theadd()branch, and the second one fails withConstraintError: Key already exists in the object store.Nothing catches the rejection, so it reacheswindow.onunhandledrejection— our Sentry handler — and gets filed against our project.Why it is not Onyx:
put,delete,get,clear. There is noadd()in onyx 3.0.101 or in idb-keyval.add(). Checked in a real browser:add()on an existing key gives that exact message,put()on the same key succeeds, and the error carries no stack — which matches the missing stacktrace andDOMException.code: 0on the Sentry events.We already filter a sibling error from the same script.
setupSentry.tsignoresNon-Error promise rejection captured with value: No data found for key, with a comment naming the Convert script.Proposed fix, same pattern as that one: add
ConstraintError: Key already exists in the object store.toignoreErrorsinsetupSentry.ts.thirdPartyErrorFilterIntegrationcannot handle it, because the error has no stack frames to tag. Onyx never callsadd(), so no real Onyx failure is hidden, and genuine storage errors still reach our logs.The
add()→put()change itself sits in vendor code, so it needs a ticket to Convert. Tracking that separately.fabioh8010 commentedon Sep 3, 2026
@mountiny looks like the same issue addressed in #99819, if you agree we can create a PR for this
elirangoshen commentedon Sep 7, 2026
Hi, I will be in vacation from tomorrow (08.09) until 15.09
I will find someone from my team to continue to work on this issue while I'm away
kacper-mikolajczak commentedon Sep 8, 2026
Hi! I will fill in for @elirangoshen here. @mountiny I was told you are the one to reach out to for the PR review. Let me know what you think aobut the proposed solution. Thanks!
mountiny commentedon Sep 9, 2026
Answered on the pr
melvin-bot commentedon Sep 10, 2026
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
3 remaining items
mountiny commentedon Sep 15, 2026
We can close this now
abzokhattab commentedon Sep 19, 2026
looks like payment was missing here,, can we please reopen @mountiny
cc @mallenexpensify
[-][Onyx] Investigate `ConstraintError: Key already exists in the object store` storage error[/-][+][Due for payment 2026-09-21] [Onyx] Investigate `ConstraintError: Key already exists in the object store` storage error[/+]melvin-bot commentedon Sep 21, 2026
Current assignee @mallenexpensify is eligible for the Awaiting Payment assigner, not assigning anyone new.
melvin-bot commentedon Sep 21, 2026
Payment Summary
Resolving PRs:
[No QA] Ignore the Convert script's duplicate-key IndexedDB rejection in Sentry #100275
Reviewer: @abzokhattab owed $250 via NewDot
Contributor: @kacper-mikolajczak does not require payment (Contractor)
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Sep 23, 2026
Payment Summary
Contributor+: @abzokhattab due $250 via NewDot
quinthar commentedon Sep 25, 2026
Approved $250 to @abzokhattab