When enable persistence, iPad mini keep showing following error messages:

Just enable persistence
AngularFirestoreModule.enablePersistence()
// TODO(you): code here to reproduce the problem
I have been seeing the same issue for a while now. Is there any fix planned?
@nathanfan46 Can you get us some code, or a sample repo to illustrate the problem?
We rely on IndexedDB which is unfortunately not available in Safari 9. The right "fix" here is to expand our isAvailable() check here [https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/local/simple_db.ts#L85] to detect Safari 9 so we gracefully fail to enable persistence instead of crashing... We'll take a look at making this change in an upcoming release.
@jshcrowthe I created a simple ionic project with AngularFirestoreModule.enablePersistence()
you can reproduce the issue by running command ionic cordova run ios -lcs
https://github.com/nathanfan46/rttest1
@mikelehen Thank you for the response, it would be better to not having persistence than crash.
I can confirm the same issue on Android 4.4 (Android 5 and above all working fine)! If I enable persistence firestore is not working. If I disable it, everything works fine. I check for IndexedDb and he returns that this is available. Is there maybe another reason why enable persistence causes the issue?
@paulstelzer Unfortunately my guess is the Android 4.4 device you're using only has partial IndexedDB support. I see reference to some devices that define IndexedDB but is lacking some features (e.g. https://gist.github.com/nolanlawson/40f59d1d718d9c84c5cb).
This likely means we need to improve our isAvailable() check to exclude these devices that don't have sufficiently full IndexedDB support (similar to our plan for Safari 9).
following
@mikelehen : Is this issue fixed? I have not been able to enable offline persistence in my web app due to this issue. Please help.
I don't know if this always fits, but you can check for navigator.serviceWorker. If this is available, you can activate persistence, otherwise not. This seems to work good for me
export function FirestorePersistenceEnabler() {
console.log('FirestorePersistenceEnabler', navigator.serviceWorker);
if (navigator.serviceWorker === undefined) {
return false;
}
return true;
}
We haven't fixed this. PRs welcome. It should just be a matter of updating this check: https://github.com/firebase/firebase-js-sdk/blob/fe48712fd9f0d1e1cd05bb2b706de5302d5c7d6e/packages/firestore/src/local/simple_db.ts#L132
Hello @mikelehn
I have a Cordova-app for Android and iOS.
I need to ship my app only to Android and iOS versions compatible with Firestore offline support for Firebase JS SDK.
@mesqueeb Sorry, I don't know anything more than is captured in this github issue. Your best bet will probably be to test for yourself so you can be sure your app works as desired.
@mesqueeb
A list of supported browsers and OS versions can be found here: https://caniuse.com/#feat=indexeddb
Fixed in #1703, which will be included in the next SDK release.
iOS Safari for versions < iOS 10 and Android OS < 4.5 will default to not enabling persistence.
Most helpful comment
We rely on IndexedDB which is unfortunately not available in Safari 9. The right "fix" here is to expand our isAvailable() check here [https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/local/simple_db.ts#L85] to detect Safari 9 so we gracefully fail to enable persistence instead of crashing... We'll take a look at making this change in an upcoming release.