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

Catch transaction.done errors #7984

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Catch transaction.done errors #7984

merged 2 commits into from
Jan 29, 2024

Conversation

hsubox76
Copy link
Contributor

The idb library we use has a done promise on all transactions, which can throw unhandled rejections. It must be included in all try/catch blocks in order to avoid an unhandled rejection.

This is part of the platform logging functionality, which should never throw or block user app functionality. This change ensures it will be caught along with all other transaction errors and converted to a console.warn.

@hsubox76 hsubox76 requested review from a team as code owners January 26, 2024 23:03
Copy link

changeset-bot bot commented Jan 26, 2024

🦋 Changeset detected

Latest commit: 8ddc7e3

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 Jan 26, 2024

Size Report 1

Affected Products

  • @firebase/app

    TypeBase (d8f4ea2)Merge (3e7dff7)Diff
    browser14.7 kB14.7 kB+26 B (+0.2%)
    esm519.2 kB19.3 kB+44 B (+0.2%)
    main20.1 kB20.2 kB+44 B (+0.2%)
    module14.7 kB14.7 kB+26 B (+0.2%)
  • bundle

    46 size changes

    TypeBase (d8f4ea2)Merge (3e7dff7)Diff
    analytics (logEvent)44.0 kB44.1 kB+23 B (+0.1%)
    app-check (CustomProvider)36.9 kB36.9 kB+23 B (+0.1%)
    app-check (ReCaptchaEnterpriseProvider)39.4 kB39.5 kB+23 B (+0.1%)
    app-check (ReCaptchaV3Provider)39.4 kB39.4 kB+23 B (+0.1%)
    auth (Anonymous)73.8 kB73.8 kB+23 B (+0.0%)
    auth (EmailAndPassword)82.0 kB82.1 kB+23 B (+0.0%)
    auth (GoogleFBTwitterGitHubPopup)101 kB101 kB+23 B (+0.0%)
    auth (GooglePopup)98.1 kB98.1 kB+23 B (+0.0%)
    auth (GoogleRedirect)98.3 kB98.3 kB+23 B (+0.0%)
    auth (Phone)84.4 kB84.4 kB+23 B (+0.0%)
    database (Append to a list of data)149 kB149 kB+23 B (+0.0%)
    database (Filtering data)147 kB147 kB+23 B (+0.0%)
    database (Listen for child events)164 kB164 kB+23 B (+0.0%)
    database (Listen for value events + Detach listeners)164 kB164 kB+23 B (+0.0%)
    database (Listen for value events)164 kB164 kB+23 B (+0.0%)
    database (Read data once)163 kB163 kB+23 B (+0.0%)
    database (Save data as transactions)166 kB166 kB+23 B (+0.0%)
    database (Sort data)149 kB149 kB+23 B (+0.0%)
    database (Write data)148 kB148 kB+23 B (+0.0%)
    firestore (CSI Auto Indexing Disable and Delete)268 kB268 kB+23 B (+0.0%)
    firestore (CSI Auto Indexing Enable)268 kB268 kB+23 B (+0.0%)
    firestore (Persistence)303 kB303 kB+23 B (+0.0%)
    firestore (Query Cursors)246 kB246 kB+23 B (+0.0%)
    firestore (Query)243 kB243 kB+23 B (+0.0%)
    firestore (Read data once)231 kB231 kB+23 B (+0.0%)
    firestore (Read Write w Persistence)321 kB321 kB+23 B (+0.0%)
    firestore (Realtime updates)234 kB234 kB+23 B (+0.0%)
    firestore (Transaction)211 kB211 kB+23 B (+0.0%)
    firestore (Write data)211 kB211 kB+23 B (+0.0%)
    firestore-lite (Query Cursors)89.4 kB89.4 kB+23 B (+0.0%)
    firestore-lite (Query)85.5 kB85.5 kB+23 B (+0.0%)
    firestore-lite (Read data once)61.7 kB61.7 kB+23 B (+0.0%)
    firestore-lite (Transaction)86.6 kB86.6 kB+23 B (+0.0%)
    firestore-lite (Write data)71.2 kB71.3 kB+23 B (+0.0%)
    functions (call)31.4 kB31.5 kB+23 B (+0.1%)
    messaging (send + receive)46.8 kB46.8 kB+23 B (+0.0%)
    performance (trace)51.3 kB51.3 kB+23 B (+0.0%)
    remote-config (getAndFetch)45.8 kB45.8 kB+23 B (+0.1%)
    storage (getBytes)41.6 kB41.6 kB+23 B (+0.1%)
    storage (getDownloadURL)43.6 kB43.7 kB+23 B (+0.1%)
    storage (getMetadata)43.1 kB43.1 kB+23 B (+0.1%)
    storage (list + listAll)42.5 kB42.5 kB+23 B (+0.1%)
    storage (updateMetadata)43.4 kB43.4 kB+23 B (+0.1%)
    storage (uploadBytes)48.2 kB48.2 kB+23 B (+0.0%)
    storage (uploadBytesResumable)58.2 kB58.2 kB+23 B (+0.0%)
    storage (uploadString)48.4 kB48.4 kB+23 B (+0.0%)

  • firebase

    TypeBase (d8f4ea2)Merge (3e7dff7)Diff
    firebase-app-compat.js29.2 kB29.2 kB+19 B (+0.1%)
    firebase-app.js94.4 kB94.5 kB+123 B (+0.1%)
    firebase-compat.js780 kB780 kB+19 B (+0.0%)
    firebase-performance-standalone-compat.es2017.js90.4 kB90.4 kB+19 B (+0.0%)
    firebase-performance-standalone-compat.js67.5 kB67.6 kB+52 B (+0.1%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 26, 2024

Size Analysis Report 1

This report is too large (140,758 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/5X29OA6Wny.html

@hsubox76 hsubox76 merged commit 3f8cbcd into master Jan 29, 2024
41 of 44 checks passed
@hsubox76 hsubox76 deleted the ch-catch-idb-2 branch January 29, 2024 18:34
@google-oss-bot google-oss-bot mentioned this pull request Jan 30, 2024
@firebase firebase locked and limited conversation to collaborators Feb 29, 2024
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