Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn instead of throw for idb errors in core app #6480

Merged
merged 4 commits into from
Aug 2, 2022
Merged

Conversation

hsubox76
Copy link
Contributor

IndexedDB is used in firebase/app for platform logging purposes. If there are any issues reading and writing to IDB, they should not throw and crash the rest of the app. Changed all caught failures to warn instead of throw.

Also renaming the error codes because they can be misleading and make it looks like the errors are related to Firebase Storage, the product.

Addresses "Error 1" listed in #6456

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2022

🦋 Changeset detected

Latest commit: 0dafdb1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@firebase/app Patch
@firebase/app-compat Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 27, 2022

Size Report 1

Affected Products

  • @firebase/app

    TypeBase (f5426a5)Merge (0dcb883)Diff
    browser13.9 kB14.1 kB+204 B (+1.5%)
    esm518.1 kB18.4 kB+246 B (+1.4%)
    main19.1 kB19.3 kB+242 B (+1.3%)
    module13.9 kB14.1 kB+204 B (+1.5%)
  • bundle

    43 size changes

    TypeBase (f5426a5)Merge (0dcb883)Diff
    analytics (logEvent)41.8 kB41.9 kB+110 B (+0.3%)
    app-check (CustomProvider)35.4 kB35.5 kB+110 B (+0.3%)
    app-check (ReCaptchaEnterpriseProvider)37.6 kB37.7 kB+110 B (+0.3%)
    app-check (ReCaptchaV3Provider)37.6 kB37.7 kB+110 B (+0.3%)
    auth (Anonymous)66.3 kB66.4 kB+110 B (+0.2%)
    auth (EmailAndPassword)70.4 kB70.5 kB+110 B (+0.2%)
    auth (GoogleFBTwitterGitHubPopup)90.3 kB90.4 kB+110 B (+0.1%)
    auth (GooglePopup)90.0 kB90.1 kB+110 B (+0.1%)
    auth (GoogleRedirect)90.2 kB90.3 kB+110 B (+0.1%)
    auth (Phone)76.5 kB76.6 kB+110 B (+0.1%)
    database (Append to a list of data)145 kB145 kB+110 B (+0.1%)
    database (Filtering data)144 kB144 kB+110 B (+0.1%)
    database (Listen for child events)160 kB160 kB+110 B (+0.1%)
    database (Listen for value events + Detach listeners)160 kB160 kB+110 B (+0.1%)
    database (Listen for value events)160 kB160 kB+110 B (+0.1%)
    database (Read data once)156 kB157 kB+110 B (+0.1%)
    database (Save data as transactions)162 kB162 kB+110 B (+0.1%)
    database (Sort data)145 kB145 kB+110 B (+0.1%)
    database (Write data)144 kB144 kB+110 B (+0.1%)
    firestore (Persistence)274 kB274 kB+110 B (+0.0%)
    firestore (Query Cursors)211 kB211 kB+110 B (+0.1%)
    firestore (Query)212 kB212 kB+110 B (+0.1%)
    firestore (Read data once)200 kB200 kB+110 B (+0.1%)
    firestore (Realtime updates)202 kB202 kB+110 B (+0.1%)
    firestore (Transaction)184 kB184 kB+110 B (+0.1%)
    firestore (Write data)184 kB184 kB+110 B (+0.1%)
    firestore-lite (Query Cursors)67.9 kB68.0 kB+110 B (+0.2%)
    firestore-lite (Query)71.1 kB71.2 kB+110 B (+0.2%)
    firestore-lite (Read data once)55.5 kB55.6 kB+110 B (+0.2%)
    firestore-lite (Transaction)80.1 kB80.2 kB+110 B (+0.1%)
    firestore-lite (Write data)65.3 kB65.4 kB+110 B (+0.2%)
    functions (call)29.2 kB29.3 kB+110 B (+0.4%)
    messaging (send + receive)45.1 kB45.3 kB+110 B (+0.2%)
    performance (trace)49.6 kB49.7 kB+110 B (+0.2%)
    remote-config (getAndFetch)44.2 kB44.3 kB+110 B (+0.2%)
    storage (getBytes)37.5 kB37.6 kB+110 B (+0.3%)
    storage (getDownloadURL)39.6 kB39.7 kB+110 B (+0.3%)
    storage (getMetadata)39.0 kB39.1 kB+110 B (+0.3%)
    storage (list + listAll)38.4 kB38.6 kB+110 B (+0.3%)
    storage (updateMetadata)39.3 kB39.4 kB+110 B (+0.3%)
    storage (uploadBytes)43.8 kB43.9 kB+110 B (+0.3%)
    storage (uploadBytesResumable)53.3 kB53.4 kB+110 B (+0.2%)
    storage (uploadString)44.0 kB44.2 kB+110 B (+0.2%)

  • firebase

    TypeBase (f5426a5)Merge (0dcb883)Diff
    firebase-app-compat.js27.7 kB27.8 kB+90 B (+0.3%)
    firebase-app.js87.4 kB87.7 kB+334 B (+0.4%)
    firebase-compat.js794 kB794 kB+96 B (+0.0%)
    firebase-performance-standalone-compat.es2017.js87.5 kB87.6 kB+104 B (+0.1%)
    firebase-performance-standalone-compat.js65.3 kB65.4 kB+104 B (+0.2%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/bC5mDvKLuC.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 27, 2022

Size Analysis Report 1

This report is too large (136,529 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/lf76xyYve4.html

Copy link
Contributor

@dwyfrequency dwyfrequency left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hsubox76 hsubox76 merged commit 82a6add into master Aug 2, 2022
@hsubox76 hsubox76 deleted the ch-app-idb branch August 2, 2022 21:41
@google-oss-bot google-oss-bot mentioned this pull request Aug 4, 2022
@firebase firebase locked and limited conversation to collaborators Sep 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants