Skip to content

Auth V9 Error on Chrome Android when Offline #5720

Description

@nasgnat

[REQUIRED] Describe your environment

  • Operating System version: Android 10
  • Browser version: Chrome 95.0.4638.74
  • Firebase SDK version: v9.4.1
  • Firebase Product: Auth

[REQUIRED] Describe the problem

EDITED

Error messages that appear on Chrome for Android:

GET https://apis.google.com/js/api.js?onload=__iframefcb993633 net::ERR_INTERNET_DISCONNECTED load_js.ts

Uncaught (in promise) FirebaseError: Firebase: Error (auth/internal-error). errors.ts:91
    at createErrorInternal (assert.ts:128)
    at _createError (assert.ts:83)
    at HTMLScriptElement.el.onerror (load_js.ts:32)

Steps to reproduce:

While online, go to a Auth-enabled PWA using Chrome on Android. Browse some pages. After that go offline. Reload/revisit previously visited pages. What I found was that Firebase stop working. I didn't experience this on desktop also before v9.

Relevant Code:

const auth = getAuth(app);

Activity

  1. ehsannas commented on Nov 12, 2021

    @ehsannas
    Contributor

    Thanks for reporting @nasgnat

    Would you be able to provide more information?

    You can follow the code snippet shown here to see what the error actually is.
    You can also enable debug messages by using firestore.setLogLevel('debug'); (reference)

  2. self-assigned this
    on Nov 12, 2021
  3. nasgnat commented on Nov 13, 2021

    @nasgnat
    Author

    Thank you for your input @ehsannas. I have edited the issue above.

    Turns out it wasn't the Firestore that was the error. It was only affected by the real error, namely auth?

  4. changed the title [-]Firestore V9 Access Data Offline not Working on Chrome Android[/-] [+]Auth V9 Error on Chrome Android when Offline[/+] on Nov 13, 2021
  5. removed their assignment
    on Nov 14, 2021
  6. RaheutRahwana commented on Nov 22, 2021

    @RaheutRahwana

    I can reproduce this. I think the problem is when using a mobile device, the load_js.ts file calls https://apis.google.com/js/api.js.

    This https://apis.google.com/js/api.js seems to require internet to work, so when the device is offline, it throws an error and stops the code afterwards. In your case it is Firebase Auth.

    CMIIW

  7. nasgnat commented on Nov 23, 2021

    @nasgnat
    Author

    Thx for the info @RaheutRahwana. Looks like I'll have to roll back to v8 again until this issue is resolved.

  8. nasgnat commented on Nov 25, 2021

    @nasgnat
    Author

    Update

    I found the same problem in Stack Overflow. Although it is not clear which version of the sdk is used.

    https://stackoverflow.com/questions/69708575/firebase-app-cannot-be-used-in-offline-mode

  9. sam-gc commented on Dec 2, 2021

    @sam-gc
    Contributor

    Thanks for filing this! The linked PR should fix the issue; it should be available in the next release or the one after!

  10. NextSteps79 commented on Dec 31, 2021

    @NextSteps79
  11. locked and limited conversation to collaborators on Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions