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 more heartbeat read/write errors #7272

Merged
merged 2 commits into from
May 1, 2023
Merged

Catch more heartbeat read/write errors #7272

merged 2 commits into from
May 1, 2023

Conversation

hsubox76
Copy link
Contributor

These indexeddb read/write functions are supposed to never throw, as they are part of platform logging, which should never impact user functionality. There is a try/catch to prevent this, but unfortunately the last statement in each try block was returning a promise directly instead of using await, which prevents try from catching errors in that statement. Converted them to await statements. They should be properly caught by try/catch now.

Fixes #6871

@changeset-bot
Copy link

changeset-bot bot commented Apr 28, 2023

🦋 Changeset detected

Latest commit: 0822cb1

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

@hsubox76 hsubox76 marked this pull request as ready for review April 28, 2023 19:03
@hsubox76 hsubox76 requested review from a team and dwyfrequency as code owners April 28, 2023 19:03
@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • @firebase/app

    TypeBase (5a2ceb0)Merge (0d57899)Diff
    browser14.3 kB14.4 kB+25 B (+0.2%)
    esm518.8 kB18.9 kB+77 B (+0.4%)
    main19.7 kB19.8 kB+77 B (+0.4%)
    module14.3 kB14.4 kB+25 B (+0.2%)
  • bundle

    43 size changes

    TypeBase (5a2ceb0)Merge (0d57899)Diff
    analytics (logEvent)43.8 kB43.8 kB+15 B (+0.0%)
    app-check (CustomProvider)36.3 kB36.3 kB+15 B (+0.0%)
    app-check (ReCaptchaEnterpriseProvider)38.8 kB38.8 kB+15 B (+0.0%)
    app-check (ReCaptchaV3Provider)38.8 kB38.8 kB+15 B (+0.0%)
    auth (Anonymous)71.2 kB71.2 kB+15 B (+0.0%)
    auth (EmailAndPassword)76.1 kB76.2 kB+15 B (+0.0%)
    auth (GoogleFBTwitterGitHubPopup)97.4 kB97.4 kB+15 B (+0.0%)
    auth (GooglePopup)94.7 kB94.7 kB+15 B (+0.0%)
    auth (GoogleRedirect)94.9 kB94.9 kB+15 B (+0.0%)
    auth (Phone)81.1 kB81.1 kB+15 B (+0.0%)
    database (Append to a list of data)148 kB148 kB+15 B (+0.0%)
    database (Filtering data)147 kB147 kB+15 B (+0.0%)
    database (Listen for child events)164 kB164 kB+15 B (+0.0%)
    database (Listen for value events + Detach listeners)164 kB164 kB+15 B (+0.0%)
    database (Listen for value events)163 kB163 kB+15 B (+0.0%)
    database (Read data once)163 kB163 kB+15 B (+0.0%)
    database (Save data as transactions)166 kB166 kB+15 B (+0.0%)
    database (Sort data)149 kB149 kB+15 B (+0.0%)
    database (Write data)147 kB147 kB+15 B (+0.0%)
    firestore (Persistence)298 kB298 kB+15 B (+0.0%)
    firestore (Query Cursors)237 kB237 kB+15 B (+0.0%)
    firestore (Query)234 kB234 kB+15 B (+0.0%)
    firestore (Read data once)222 kB222 kB+15 B (+0.0%)
    firestore (Realtime updates)224 kB224 kB+15 B (+0.0%)
    firestore (Transaction)201 kB201 kB+15 B (+0.0%)
    firestore (Write data)201 kB201 kB+15 B (+0.0%)
    firestore-lite (Query Cursors)81.7 kB81.7 kB+15 B (+0.0%)
    firestore-lite (Query)77.9 kB77.9 kB+15 B (+0.0%)
    firestore-lite (Read data once)60.0 kB60.0 kB+15 B (+0.0%)
    firestore-lite (Transaction)84.8 kB84.8 kB+15 B (+0.0%)
    firestore-lite (Write data)69.6 kB69.6 kB+15 B (+0.0%)
    functions (call)31.1 kB31.1 kB+15 B (+0.0%)
    messaging (send + receive)46.5 kB46.5 kB+15 B (+0.0%)
    performance (trace)51.0 kB51.0 kB+15 B (+0.0%)
    remote-config (getAndFetch)45.5 kB45.5 kB+15 B (+0.0%)
    storage (getBytes)41.3 kB41.3 kB+15 B (+0.0%)
    storage (getDownloadURL)43.4 kB43.4 kB+15 B (+0.0%)
    storage (getMetadata)42.8 kB42.8 kB+15 B (+0.0%)
    storage (list + listAll)42.2 kB42.2 kB+15 B (+0.0%)
    storage (updateMetadata)43.1 kB43.1 kB+15 B (+0.0%)
    storage (uploadBytes)48.2 kB48.2 kB+15 B (+0.0%)
    storage (uploadBytesResumable)58.1 kB58.1 kB+15 B (+0.0%)
    storage (uploadString)48.4 kB48.4 kB+15 B (+0.0%)

  • firebase

    TypeBase (5a2ceb0)Merge (0d57899)Diff
    firebase-app-compat.js28.9 kB28.9 kB+5 B (+0.0%)
    firebase-app.js93.3 kB93.4 kB+37 B (+0.0%)
    firebase-compat.js772 kB772 kB+5 B (+0.0%)
    firebase-performance-standalone-compat.es2017.js90.1 kB90.1 kB+14 B (+0.0%)
    firebase-performance-standalone-compat.js67.2 kB67.3 kB+55 B (+0.1%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

Size Analysis Report 1

This report is too large (136,701 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/CUmHLXgTMn.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 e0551fa into master May 1, 2023
@hsubox76 hsubox76 deleted the ch-heartbeat-fix branch May 1, 2023 18:59
@google-oss-bot google-oss-bot mentioned this pull request May 11, 2023
@firebase firebase locked and limited conversation to collaborators Jun 1, 2023
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.

HeartbeatService throws error ONLY on Safari (IndexedDB issue?)
3 participants