angular / angularfire

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

AngularFirestoreModul freezes under IOS if Ionic/Cordova App goes to background #2569

Closed ebeling closed 3 years ago

ebeling commented 4 years ago

Version info

Angular: 8.3.25

Firebase: 7.17.2

AngularFire: 5.4.2

Other (e.g. Ionic/Cordova, Node, browser, operating system): Ionic cli 6.11.0 / cordova 9.0.0 / ios 13.6

How to reproduce these conditions

I use AngularFirestoreModul in my ionic-cordova app to store data while receiving data from bluetooth interface. There are problems while writing data while app goes into background (only ios): firebase freezes. I described and documented this in an issue in firebase-github: https://github.com/firebase/firebase-js-sdk/issues/3526

Can this be an issue of AngularFirestoreModul ? If not, I like to use the firebase.firestore function "terminate" ( https://firebase.google.com/docs/reference/node/firebase.firestore.Firestore#terminate ) when app goes into background and after comes back to foreground I like reinitialize AngularFirestoreModul. Is this possible?

jamesdaniels commented 3 years ago

Looks like the JS SDK addressed the issue. For future reference you can make JS SDK calls on AngularFirestore by just calling .firestore to get at the underlying firestore instance.