Skip to content

[Onyx] Investigate DataError: Failed to write blobs (InvalidBlob) storage error #87871

Closed

Description

@fabioh8010

Coming from #87844.

Summary

Let's investigate the following Onyx storage error: DataError: Failed to write blobs (InvalidBlob), which accounts for 63,281 (1.9%) of the 3,364,645 analysed errors during a time span of 1 month. Full details about the investigation and methodology are in #87844.

Platforms Top Methods
Desktop Chrome (61K), Desktop Edge (2K) multiSetWithRetry (48K), setWithRetry (15K)
Retries Exhausted Evictions No Eviction Quota Checks >= 95% Full Mean % Full Quota Check Failed
9,537 0 0 0 — — 0
  • Chromium-exclusive — blob data becoming invalid between when it's created and when it's written to IDB
  • Notable that multiSetWithRetry dominates (76%) — batch writes are more susceptible
  • Not a capacity error, so no eviction — retries are unlikely to help since the blob data is fundamentally invalid

Action Items

  • Investigate with Sentry, VictoriaLogs and Fullstory to understand user scenarios — what data is being written when blobs become invalid? Are there specific pages or actions that produce blob-containing data?
  • Investigate why multiSetWithRetry is disproportionately affected (76%) — blob references may become invalid during the time it takes to batch multiple writes
  • Consider validating blob data before writing, or catching this specific error and retrying with fresh blob references

Issue OwnerCurrent Issue Owner: @fabioh8010

Activity

  1. melvin-bot commented on Jun 29, 2026

    @melvin-bot

    @fabioh8010, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

  2. fabioh8010 commented on Jun 30, 2026

    @fabioh8010
    ContributorAuthor

    @mountiny Could you reopen? Thanks!

  3. fabioh8010 commented on Jul 8, 2026

    @fabioh8010
    ContributorAuthor

    @Julesssss

    @elirangoshen will work on this one, could you assign him instead? Thanks!

  4. elirangoshen commented on Jul 20, 2026

    @elirangoshen
    Contributor

    Hi, there is potential lead, and Im working with @fabioh8010 to validate the idea before opening the pr. (for now the pr is drafted)

  5. elirangoshen commented on Jul 21, 2026

    @elirangoshen
    Contributor

    I still validating the fix by trying to reproduce it locally

  6. elirangoshen commented on Jul 23, 2026

    @elirangoshen
    Contributor

    Update: I was able to reproduce it locally and now investigating solutions

  7. fabioh8010 commented on Aug 17, 2026

    @fabioh8010
    ContributorAuthor

    Updates:

    Waiting for Bump PR of Expensify/react-native-onyx#814 to land before @elirangoshen can check logs and confirm issue is mitigated.

  8. elirangoshen commented on Aug 31, 2026

    @elirangoshen
    Contributor

    Confirmed mitigated — safe to close

    Following up on the blocker in this comment: the wait was on the bump PR for react-native-onyx#814 to land. That bump PR, #96957, is still open and titled [TESTING ONLY] — it was a pin for verification and was never intended to merge. The change reached production anyway through the normal version bumps, so the blocker is resolved.

    Both fixes are in production

    change merged in production via
    #96940 — snapshot picked files into memory-backed Files (the root fix) Jul 28 9.4.46-10, Jul 31
    onyx#814 — classify Failed to write blobs as INVALID_DATA, never retry Aug 3 onyx 3.0.95+, pinned exact 3.0.98 in ce8b8ed5a19 on Aug 20; main is on 3.0.101 today

    I unpacked the published tarballs to confirm the onyx side: the failed to write blobs branch in classifyError.ts is present in 3.0.95 and every version after it. App carried ^3.0.95 from Jul 31 and an exact pin from Aug 20, so #814 has been live for weeks without #96957.

    Log verification

    VictoriaLogs, query "Failed to write blobs", Aug 24-30:

    • 1,976 hits total, 1-5 unique users per day, ~10 unique users over the window.
    • Pre-fix baseline was ~383k/day.

    The 1,784-event spike on Aug 25 is almost entirely a single client, and the source field explains it. source is <platform-token><app-version> concatenated, so ecash… is NewDot web, iphone… is iOS, android… is Android:

    source hits (7d)
    ecash9.4.40-0 1750
    ecash9.4.62-4 74
    ecash9.4.58-4 73
    ecash9.4.59-5 34
    ecash9.4.55-4 16
    ecash9.4.63-1 8
    ecash9.4.57-3 8
    ecash9.4.60-2 7
    ecash9.4.61-4 6

    Every source is ecash, i.e. web only — expected, since this is an IndexedDB write path.

    That 1,750-event burst came from ecash9.4.40-0 — a NewDot web client on App 9.4.40-0, which was tagged Jul 20. The first release carrying #96940 was 9.4.46-10, tagged Jul 30, so that client has neither #96940 nor #814.

    On web the reported version comes from the JS bundle loaded at page load, so a tab opened on Jul 20 and never reloaded keeps reporting 9.4.40-0 indefinitely. That population is real but small — source:ecash9.4.40-0 logged 3,360 lines from 21 distinct users on Aug 29 — and all 1,750 InvalidBlob events came from one of those users. It is not a live regression on current code, and it clears itself once those tabs reload.

    Across all current releases combined the residual is ~226 hits/week over ~9 users, single-to-double digits per release. Those remaining events are also the macOS IOError dialect (Failed to write blobs (IOError)), while the InvalidBlob variant named in this issue's title is zero on every current release — all 1,750 InvalidBlob events trace to the one stale client.

    Conclusion

    ~99.99% reduction, and what remains is a stale-bundle tail rather than an active failure mode. Closing this as completed.

    Also closing #96957, which is superseded — the change it was pinning shipped through the regular onyx bump.

    What do you think @Julesssss @fabioh8010 ?

  9. fabioh8010 commented on Aug 31, 2026

    @fabioh8010
    ContributorAuthor

    I agree we can wrap up this one

  10. Julesssss commented on Aug 31, 2026

    @Julesssss
    Contributor

    Agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions