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

Change _fail to use NETWORK_REQUEST_FAILED #7125

Merged
merged 3 commits into from
Mar 16, 2023
Merged

Change _fail to use NETWORK_REQUEST_FAILED #7125

merged 3 commits into from
Mar 16, 2023

Conversation

NhienLam
Copy link
Contributor

Fix #7118.
https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/api/index.ts#L184 throws INTERNAL_ERROR when there is a network error. However, https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/core/auth/auth_impl.ts#L309-L316 treats any error other than NETWORK_REQUEST_FAILED as token is invalid and signs user out which is not an expected behavior. Hence, we're changing it back to using NETWORK_REQUEST_FAILED.

@changeset-bot
Copy link

changeset-bot bot commented Mar 15, 2023

🦋 Changeset detected

Latest commit: f3810d8

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

This PR includes changesets to release 3 packages
Name Type
@firebase/auth Patch
@firebase/auth-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 Mar 15, 2023

Size Report 1

Affected Products

  • @firebase/auth

    TypeBase (9a21a57)Merge (5e05f73)Diff
    browser157 kB157 kB+8 B (+0.0%)
    cordova184 kB184 kB+8 B (+0.0%)
    esm5205 kB205 kB+8 B (+0.0%)
    main148 kB148 kB+8 B (+0.0%)
    module157 kB157 kB+8 B (+0.0%)
    react-native168 kB168 kB+8 B (+0.0%)
  • @firebase/auth/cordova

    TypeBase (9a21a57)Merge (5e05f73)Diff
    browser184 kB184 kB+8 B (+0.0%)
    module184 kB184 kB+8 B (+0.0%)
  • @firebase/auth/internal

    TypeBase (9a21a57)Merge (5e05f73)Diff
    browser167 kB167 kB+8 B (+0.0%)
    esm5218 kB218 kB+8 B (+0.0%)
    main184 kB184 kB+8 B (+0.0%)
    module167 kB167 kB+8 B (+0.0%)
  • @firebase/auth/react-native

    TypeBase (9a21a57)Merge (5e05f73)Diff
    browser168 kB168 kB+8 B (+0.0%)
    module168 kB168 kB+8 B (+0.0%)
  • @firebase/firestore

    TypeBase (9a21a57)Merge (5e05f73)Diff
    browser274 kB278 kB+3.90 kB (+1.4%)
    esm5341 kB346 kB+4.48 kB (+1.3%)
    main549 kB554 kB+4.44 kB (+0.8%)
    module274 kB278 kB+3.90 kB (+1.4%)
    react-native274 kB278 kB+3.90 kB (+1.4%)
  • @firebase/firestore-lite

    TypeBase (9a21a57)Merge (5e05f73)Diff
    browser87.4 kB87.7 kB+268 B (+0.3%)
    esm5105 kB106 kB+268 B (+0.3%)
    main149 kB149 kB+31 B (+0.0%)
    module87.4 kB87.7 kB+268 B (+0.3%)
    react-native87.6 kB87.9 kB+268 B (+0.3%)
  • bundle

    18 size changes

    TypeBase (9a21a57)Merge (5e05f73)Diff
    auth (Anonymous)67.6 kB67.6 kB+8 B (+0.0%)
    auth (EmailAndPassword)71.7 kB71.7 kB+8 B (+0.0%)
    auth (GoogleFBTwitterGitHubPopup)94.0 kB94.0 kB+8 B (+0.0%)
    auth (GooglePopup)91.3 kB91.3 kB+8 B (+0.0%)
    auth (GoogleRedirect)91.5 kB91.5 kB+8 B (+0.0%)
    auth (Phone)77.7 kB77.7 kB+8 B (+0.0%)
    firestore (Persistence)282 kB283 kB+1.72 kB (+0.6%)
    firestore (Query Cursors)220 kB222 kB+1.50 kB (+0.7%)
    firestore (Query)218 kB219 kB+1.50 kB (+0.7%)
    firestore (Read data once)205 kB207 kB+1.43 kB (+0.7%)
    firestore (Realtime updates)207 kB209 kB+1.43 kB (+0.7%)
    firestore (Transaction)189 kB190 kB+1.46 kB (+0.8%)
    firestore (Write data)188 kB190 kB+1.45 kB (+0.8%)
    firestore-lite (Query Cursors)81.4 kB81.6 kB+180 B (+0.2%)
    firestore-lite (Query)77.6 kB77.7 kB+180 B (+0.2%)
    firestore-lite (Read data once)59.8 kB59.9 kB+69 B (+0.1%)
    firestore-lite (Transaction)84.5 kB84.7 kB+202 B (+0.2%)
    firestore-lite (Write data)69.3 kB69.5 kB+177 B (+0.3%)

  • firebase

    TypeBase (9a21a57)Merge (5e05f73)Diff
    firebase-auth-compat.js126 kB126 kB+8 B (+0.0%)
    firebase-auth-cordova.js138 kB138 kB+8 B (+0.0%)
    firebase-auth-react-native.js150 kB150 kB+8 B (+0.0%)
    firebase-auth.js117 kB117 kB+8 B (+0.0%)
    firebase-compat.js747 kB750 kB+2.31 kB (+0.3%)
    firebase-firestore-compat.js321 kB323 kB+2.30 kB (+0.7%)
    firebase-firestore-lite.js94.2 kB94.4 kB+268 B (+0.3%)
    firebase-firestore.js323 kB327 kB+3.92 kB (+1.2%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 15, 2023

Size Analysis Report 1

This report is too large (833,202 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/Mm7APgomDr.html

@prameshj prameshj merged commit 00737a1 into master Mar 16, 2023
@prameshj prameshj deleted the network-fix branch March 16, 2023 17:10
renkelvin pushed a commit that referenced this pull request Mar 21, 2023
* Change _fail to use NETWORK_REQUEST_FAILED

* Add changeset

* Check if network error is propagated in error message
dwyfrequency pushed a commit that referenced this pull request Mar 23, 2023
* Change _fail to use NETWORK_REQUEST_FAILED

* Add changeset

* Check if network error is propagated in error message
@google-oss-bot google-oss-bot mentioned this pull request Mar 29, 2023
@firebase firebase locked and limited conversation to collaborators Apr 16, 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.

Constant auth sign-out/log-out whenever the network changes.
3 participants