Questions tagged [angularfire2-offline]

Use this tag for questions about the AngularFire2 Offline library, which is a simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.

Use this tag for questions about the AngularFire2 Offline library, which is a simple wrapper for AngularFire2 to read and write to Firebase while offline, even after a complete refresh.

13 questions
4
votes
1 answer

AngularFire returns results from cache AND server when enablePersistance is enabled

I use AngularFire (6.1.4) in my Angular (11.1.1) project with offline persistence and I was surprised to see that on load, the data is provided twice: once from the cache and once from the server (I use the variable fromCache to proof the…
Francesco
  • 9,947
  • 7
  • 67
  • 110
4
votes
1 answer

TypeScript Error Cannot find module 'angularfire2/interfaces' ionic 3 angularfire2-offline

When I want to setup angularfire2-offline I get this error: [16:02:08] typescript: node_modules/angularfire2-offline/database/database.d.ts, line: 2 Cannot find module 'angularfire2/interfaces'. L1: import {…
3
votes
0 answers

How to initialize Firebase PWA app when offline?

I am having issues when lunching my PWA app in offline mode. When I do that I get Unhandled Promise rejection: Firebase: Error (auth/internal-error). ; Zone: ; Task: HTMLScriptElement.addEventListener:error ; Value: FirebaseError: Firebase:…
3
votes
3 answers

Adjust Firestore cache size with AngularFire

I'm trying to figure out the best way to enable Firestore persistence and adjust the cache size using AngularFire. Firebase documentation suggest we do it like this: firebase.firestore().settings({ cacheSizeBytes:…
2
votes
1 answer

Angular 16 enableIndexedDbPersistence

I've managed to get @angular/fire working in an Angular standalone app, but I'm attempting to turn on the offline capabilities like I have in the past, and I'm now seeing that enableIndexedDbPersistence has been marked as deprecated. It suggests…
Jake Smith
  • 2,332
  • 1
  • 30
  • 68
2
votes
1 answer

Ionic 4 IOS FIRESTORE INTERNAL ASSERTION FAILED: AsyncQueue is already failed: An internal error was encountered in the Indexed Database server

I am developing an Ionic application, I am using Firestore as a database, using offline mode. import {AngularFirestoreModule} from '@ angular / fire / Firestore'; AngularFirestoreModule.enablePersistence (), When I open the application everything…
1
vote
1 answer

Using update with batch method in a loop in Firestore

In Firestore, I am trying to update documents in a loop with the batch method. How come this code works : var batch = this.afs.firestore.batch(); var eventRef = this.eventCollection.doc(eventkey).ref; batch.update(eventRef, updateField ); var…
1
vote
0 answers

AngularFire Offline: queryFn is not a function

Im trying to retrieve chats from a firebase database with AngularFire Offline. To achieve this I wrote this function: getChat(chatId: string, batch, lastTimestamp?) { let query = { orderByChild: 'timestamp', limitToLast: batch …
Lucas Mähn
  • 736
  • 2
  • 6
  • 19
1
vote
1 answer

ionic angular : Is there any callback for add and update method with angularfirestore (offline)

I'm working on Ionic and using Angular firestore with offline persitence. While being online, i can do something in 'then' brackets but while being offline nothing happens. The add or update method works in both cases but i need some callback to…
1
vote
1 answer

Angular2Offline does not sync data if ionic app is closed without ever connecting to internet

I used Angular2Offline to sync my ionic app data and provide 'Offline First' capabilities to my app. Tutorial for implementation of Angular2Offline at JaveBratt The data is synced fine, App Start in Offline mode retrieves data from local store, any…
Thr3e
  • 358
  • 1
  • 6
  • 22
0
votes
0 answers

How to handle big data when using AngularFirestore?

I've an Angular application, connected to a firebase DB. The application will be displaying marker on a google maps, and the goal is to have it working as a Progressive Web App, with offline capabilities. I was counting on AngularFirestore to…
J4N
  • 19,480
  • 39
  • 187
  • 340
0
votes
1 answer

AngularFIre Firebase saving data locally?

I have an app that displays a list of items. Here is what I am doing. When the app first loads I am making an HTTP request to get the list from the firebase database. once the list is received the list is stored locally on localStorage for future…
-1
votes
1 answer

AngularFire list is loaded every time i open the page

When I load a list (for example user) it works very well however, every time I load this famous page, the whole list is reloaded by firebase is so uses a lot of data ... How to load it only once during the session? I have already tried to load the…