-
Notifications
You must be signed in to change notification settings - Fork 986
Closed
Description
Operating System
Mac OS, Android, IOS
Browser Version
Firefox, Safari IOS
Firebase SDK Version
10.12.0
Firebase SDK Product:
Firestore
Describe your project's tooling
Vue 3 webapp, build using Vite.
Describe the problem
Firestore keeps hanging and throwing the exception FIRESTORE (10.12.0) INTERNAL ASSERTION FAILED: Unexpected state
when it tries to fetch docs, with offlinePersistence is enabled and localstorage is full.
initializeFirestore(firebaseApp, {
localCache: persistentLocalCache(
/*settings*/ { tabManager: persistentMultipleTabManager() },
),
}),
Steps and code to reproduce issue
- Create a project using Firebase 10.12.0, I used Vue
- Initialise firestore using
initializeFirestore(firebaseApp, {
localCache: persistentLocalCache(
/*settings*/ { tabManager: persistentMultipleTabManager() },
),
}),
- Open your project
- Run the following to full up your browsers local storage, copied from https://stackoverflow.com/questions/45760110/how-to-fill-javascript-localstorage-to-its-max-capacity-quickly
try{var i;for (i = 1 ; i <= 10000; i ++) {localStorage.setItem('test', new Array(i * 100000).join('a'));}}catch(error){console.log("test stopped at i: " + i);try{var j;for (j = 1 ; j <= 100; j++) {localStorage.setItem('test2', new Array(j * 1000).join('a'));}}catch(error){console.log("test2 stopped at j: " + j);try{var k;for (k = 1 ; k <= 1000; k++) {localStorage.setItem('test3', new Array(k).join('a'));}}catch(error){console.log("test3 stopped at k: " + k);console.log("total storage: " + (i * 100000 + j * 1000 + k));}}} - Fetch a document using getDocs
- Encounter
Error: FIRESTORE (10.12.0) INTERNAL ASSERTION FAILED: Unexpected state - Or encounter something like:
AsyncQueue Initialization of query 'Query(target=Target(users/obIN5754zBcjPwlrcP8SZmm25QV2, orderBy: [__name__ (asc)]); limitType=F)' failed: QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'firestore_sequence_number_firestore/[DEFAULT]/[PROJECT]/' exceeded the quota