angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.68k stars 2.19k forks source link

Update doc for offline data and multiple tabs #1968

Closed peterpeterparker closed 3 years ago

peterpeterparker commented 5 years ago

Doc:

If I'm not mistaken, this library, AngularFire, as Firestore itself, does now support offline data with multiple tabs right? (reference: https://github.com/angular/angularfire2/issues/1907#issuecomment-431977457)

If that's correct, then I think the documentation about offline data (https://github.com/angular/angularfire2/blob/master/docs/firestore/offline-data.md) should be updated as the following is still mentioned:

If a user opens multiple browser tabs that point to the same Cloud Firestore database, and offline persistence is enabled, Cloud Firestore will work correctly only in the first tab.

Note

I'm not 100% sure that's why I opened this doc improvement feature request without PR to remove this phrase. If it's correct and you wish me to provide one, no worries, let me know

Alphonse99 commented 5 years ago

I got error

Unhandled Promise rejection: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. ; Zone: ; Task: Promise.then ; Value: DOMException: Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. when try to open in multitab on chrome

jamesdaniels commented 5 years ago

We now support use of the experimentalTabSynchronization configuration flag. AngularFirestoreModule.enablePersistence({experimentalTabSynchronization: true})

I'll leave this open for updating the docs.

peterpeterparker commented 5 years ago

@jamesdaniels thx for the feedback. exactly it's what I meant, just the doc "need" to be updated

jbgomez21 commented 5 years ago

Hi @peterpeterparker I have the same error:

"Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing. "

But, I am not using multitab, I am on ionic cordova application. aprox 25% user login fails with that error.

some help?

@angular/fire": "^5.0.2" "firebase": "^5.0.3"

PeterKassenaar commented 5 years ago

@jbgomez21 Maybe you meant @peterpeterparker? I have no part in this discussion and have not used Ionic/Cordova in this context ;-)

jbgomez21 commented 5 years ago

Yes @PeterKassenaar, sorry, I had hash collision of Peters :)

peterpeterparker commented 5 years ago

@jbgomez21 I didn't face or faced the error you are mentioning. @Alphonse99 did but it isn't related to this issue sorry

jorroll commented 4 years ago

Per #2092 (closed), experimentalTabSynchronization was made non-experimental in version 5.2 of this library. Am I correct in thinking that the docs should now be updated to reflect the fact that this is no longer a beta feature?