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

Auth V9 Error on Chrome Android when Offline #5720

Closed
nasgnat opened this issue Nov 11, 2021 · 7 comments · Fixed by #5777
Closed

Auth V9 Error on Chrome Android when Offline #5720

nasgnat opened this issue Nov 11, 2021 · 7 comments · Fixed by #5777

Comments

@nasgnat
Copy link

nasgnat commented Nov 11, 2021

[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);
@ehsannas
Copy link
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)

@ehsannas ehsannas self-assigned this Nov 12, 2021
@nasgnat
Copy link
Author

nasgnat commented Nov 13, 2021

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?

@nasgnat nasgnat changed the title Firestore V9 Access Data Offline not Working on Chrome Android Auth V9 Error on Chrome Android when Offline Nov 13, 2021
@ehsannas ehsannas removed their assignment Nov 14, 2021
@RaheutRahwana
Copy link

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

@nasgnat
Copy link
Author

nasgnat commented Nov 23, 2021

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

@nasgnat
Copy link
Author

nasgnat commented Nov 25, 2021

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

@sam-gc
Copy link
Contributor

sam-gc commented Dec 2, 2021

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

@NextSteps79

This comment has been minimized.

@firebase firebase locked and limited conversation to collaborators Jan 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants