Firebase offline persistence not working

Please provide the following:

  1. SDK Version: 37
  2. Platforms(Android/iOS/web/all): Android, iOS

Firebase firestore offline persistence is not working. getting following error.

Error enabling offline persistence. Falling back to persistence disabled: FirebaseError: [code=unimplemented]: This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.

Unhandled promise rejection: FirebaseError: This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.]

Having the same issue!

[Unhandled promise rejection: FirebaseError: This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.]
* [native code]:null in construct
- node_modules/@babel/runtime/helpers/construct.js:19:9 in _construct
- node_modules/@babel/runtime/helpers/wrapNativeSuper.js:26:22 in Wrapper

Per this thread IndexedDB is a web API not available in React Native… so we’d need to figure out if there’s a way to patch it in Firestore to replace it with one of the available stores.

Actually on more digging, found @nandorojo’s post on this here:

He’s created both a hack to get this working directly, and a SWR library to provide better fetching syntax generally.

2 Likes

I have a library that solves this: https://github.com/nandorojo/expo-firestore-offline-persistence as @rmatei mentioned.

2 Likes

Apologies for replying it late, but yes i myself tumbled around same package by @nandorojo and is realy helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.