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
[Onyx] Edge on Windows: every IndexedDB read and write fails with UnknownError: Internal error., leaving the web app unusable #102272
A user on Edge 153 (Windows 10, x64) can't use New Expensify on web. The app shows "Something went wrong… we have not been able to load all of your data." API calls such as OpenApp, Search and OpenReport succeed, so the failure is in local storage. The same account works in the iOS app.
What the client logs show
Between 07:32 and 09:26 UTC on 2026-09-25, the client logged these errors:
[Onyx] Failed to load data from storage during init. The app will boot with default key states only. Error: UnknownError: Internal error. (5 times, once per app load)
[Onyx] IDB error not recoverable at the connection layer, propagating (about 2,175 times), with dbName: 'OnyxDB', storeName: 'keyvaluepairs', errorClass: 'unknown' and errorMessage: 'Internal error.'
[Onyx] Unclassified storage error. provider: IDBKeyValProvider. name: UnknownError. message: Internal error. (243 times on setWithRetry and 58 times on multiSetWithRetry)
[Onyx] Storage operation failed after 5 retries (the same 243 and 58). Every write failed on all six attempts, from retryAttempt: 0/5 through 5/5.
The account has no storage errors in the logs before that morning, although the user said the problem had lasted two days.
Observations
Reads fail as well as writes. The app starts with default state on every load, so reloading doesn't help.
The error is classified as unknown. Onyx treats it as not recoverable at the connection layer, so no reconnect or recovery happens, and every write uses up its retries.
The user sees a generic error with no hint to clear site data or switch browsers.
Expected
When IndexedDB fails for both reads and writes with a non-recoverable UnknownError, the app should:
Detect the failure.
Try to recover, for example by deleting and recreating OnyxDB, or fall back to in-memory storage.
Tell the user how to recover.
Workaround
Clear site data for new.expensify.com in Edge, or use another browser or the mobile app.
On Edge (Windows) it means that we have a problem with persistence:
full disk
database left in error state after unclean shutdown of the browser / system
another process holding the directory
antivirus, disk cleaners.
We don't know what the cause is. Full disk is covered only on native (DISK_PRESSURE in classifySQLiteError). On web nothing covers any of these. StorageCircuitBreaker handles only quota errors (CAPACITY).
From source code analysis we know that the connection to the database is established. The error doesn't carry Chromium's open-failure wording (Internal error opening backing store, which we map to FATAL), so classifyError maps it to UNKNOWN. So currently what Onyx does is retry each operation 5 times (6 attempts) and then give up. If the problem is with a faulty database this will not work.
What may work here
There are three things that could work in this case:
restart the database by remove / recreate
degrade to MemoryOnlyProvider
both. First restart the database, then degrade if still faulty.
The caveat is that we would map every UnknownError to this solution. We can narrow it by matching name: UnknownError + message: Internal error. only.
Proposal of next steps
Redesign consecutive error handling in the application. Currently there are several cases:
Degrade to MemoryOnlyProvider - when IndexedDB doesn't exist at all (UNAVAILABLE). Merged to Onyx, but E/App is still not bumped.
Reconnect - when the cached connection is stale (TRANSIENT, once per operation) or the backing store is corrupted (FATAL, up to 3 times).
Do nothing - when we encounter known unrecoverable issues (the write is dropped).
Retry every operation - when we encounter an UNKNOWN error we retry every operation 5 times and then give up.
When IDB operations fail repeatedly with no success, we could do until succeeded:
try to reconnect to the database
recreate the database (delete and create a new one)
if the delete fails, we degrade to MemoryOnlyProvider
@sosek108 Have you analysed Fullstory sessions and VictoriaLogs of the user during the timespan of these errors? Do we know what they were trying to do or maybe there were another errors happening in the app?
Could we also analyse the general amount of UnknownError: Internal error. we had in the last 30 days, which browsers were, etc?
I checked the [Onyx] Failed to load data from storage during init. The app will boot with default key states only. Error: UnknownError: Internal error. logs on VictoriaLogs and looks like most of the cases can be solved with a simple closing/reopening of the IndexedDB connection.
@sosek108 do you think this approach would be enough? We should target exclusively UnknownError: Internal error. error class.
This is in compliance w/ my earlier comment where I proposed this chain.
When IDB operations fail repeatedly with no success, we could do until succeeded:
try to reconnect to the database
recreate the database (delete and create a new one)
if the delete fails, we degrade to MemoryOnlyProvider
After some thinking I would drop recreate the database and do this:
When Internal error occurs Onyx:
try to reconnect to the database (already in place)
check if this helped. And if not we fallback to MemoryOnlyProvider (this Provider is already implemented, we need to wire this case to the provider)
Activity
sosek108 commentedon Sep 25, 2026
UnknownError: Internal error
On Edge (Windows) it means that we have a problem with persistence:
We don't know what the cause is. Full disk is covered only on native (
DISK_PRESSUREinclassifySQLiteError). On web nothing covers any of these.StorageCircuitBreakerhandles only quota errors (CAPACITY).From source code analysis we know that the connection to the database is established. The error doesn't carry Chromium's open-failure wording (
Internal error opening backing store, which we map toFATAL), soclassifyErrormaps it toUNKNOWN. So currently what Onyx does is retry each operation 5 times (6 attempts) and then give up. If the problem is with a faulty database this will not work.What may work here
There are three things that could work in this case:
MemoryOnlyProviderThe caveat is that we would map every
UnknownErrorto this solution. We can narrow it by matchingname: UnknownError+message: Internal error.only.Proposal of next steps
Redesign consecutive error handling in the application. Currently there are several cases:
MemoryOnlyProvider- when IndexedDB doesn't exist at all (UNAVAILABLE). Merged to Onyx, but E/App is still not bumped.TRANSIENT, once per operation) or the backing store is corrupted (FATAL, up to 3 times).UNKNOWNerror we retry every operation 5 times and then give up.When IDB operations fail repeatedly with no success, we could do until succeeded:
MemoryOnlyProviderfabioh8010 commentedon Sep 28, 2026
@sosek108 Have you analysed Fullstory sessions and VictoriaLogs of the user during the timespan of these errors? Do we know what they were trying to do or maybe there were another errors happening in the app?
Could we also analyse the general amount of
UnknownError: Internal error.we had in the last 30 days, which browsers were, etc?sosek108 commentedon Sep 28, 2026
This error occured just after log in. User was able to signin and on home Page he saw the popup:
No other coexisting errors in the logs. A session before (4 days earlier) user was permitting normal operations, including data export.
Sentry issue analysis for last 30 days:
fabioh8010 commentedon Sep 29, 2026
I checked the
[Onyx] Failed to load data from storage during init. The app will boot with default key states only. Error: UnknownError: Internal error.logs on VictoriaLogs and looks like most of the cases can be solved with a simple closing/reopening of the IndexedDB connection.@sosek108 do you think this approach would be enough? We should target exclusively
UnknownError: Internal error.error class.sosek108 commentedon Sep 29, 2026
I think this is least we should do. I'll prepare the PR for it
sosek108 commentedon Sep 29, 2026
Here is draft PR: Expensify/react-native-onyx#853
sosek108 commentedon Sep 30, 2026
PR is open for review
sosek108 commentedon Oct 1, 2026
PR is merged, but @Pujan92 validly pushed back, that this does not fix the issue for our reported user. Expensify/react-native-onyx#853 (comment)
This is in compliance w/ my earlier comment where I proposed this chain.
After some thinking I would drop
recreate the databaseand do this:When Internal error occurs Onyx:
MemoryOnlyProvider(this Provider is already implemented, we need to wire this case to the provider)PoC drafted here: Expensify/react-native-onyx#854 (needs polishing)
cc: @fabioh8010
sosek108 commentedon Oct 1, 2026
sosek108 commentedon Oct 8, 2026
The second PR is ready for review: Expensify/react-native-onyx#854
cc: @Pujan92
mountiny commentedon Oct 9, 2026
Assigned @mkhutornyi to the PR since there was no action from the C+ there
Pujan92 commentedon Oct 9, 2026
Oh, I missed this notification and bcoz of react-native pr don't show in K2.
mountiny commentedon Oct 12, 2026
Sorry about that
mountiny commentedon Oct 12, 2026
You could try to add k2 pr to support the onyx prs in the K2