brawl-chat
brawl-chat copied to clipboard
Constraint error on byEventId during sync
Error in status bar:
Sync failed because of Error: wrapped DOMException: (name: ConstraintError) (code: ConstraintError) Unable to add key to index 'byEventId': at least one key does not satisfy the uniqueness requirements.
In console:
Uncaught (in promise) Error: add on undefined failed: (name: ConstraintError) (code: ConstraintError) Unable to add key to index 'byEventId': at least one key does not satisfy the uniqueness requirements.
at Store.add (brawl.js:3685)
8brawl.js:3685 Uncaught (in promise) Error: add on undefined failed: (name: AbortError) (code: AbortError) The transaction was aborted, so the request cannot be fulfilled.
at Store.add (brawl.js:3685)
brawl.js:3676 Uncaught (in promise) Error: put on undefined failed: (name: AbortError) (code: AbortError) The transaction was aborted, so the request cannot be fulfilled.
at Store.put (brawl.js:3676)
brawl.js:686 unable to commit sync tranaction
_syncRequest @ brawl.js:686
A refresh fixed the issue...
Perhaps the server returned a duplicate event id? But I thought we filtered those out?
We do filter them out, but only when filling gaps, not during sync... https://github.com/bwindels/brawl-chat/blob/master/src/matrix/room/timeline/persistence/GapWriter.js#L40