Error: Firestore: The service is currently unavailable. (firestore/unavailable).
Issue
Environment
-
Application Target Platform: Android
-
Development Operating System: macOs HighSierra
-
Build Tools:
-
React Nativeversion: 0.56.0 -
React Native FirebaseVersion: 4.3.7 -
FirebaseModule: Firestore -
Are you using
typescript? no
After a while a get the following error: Error: Firestore: The service is currently unavailable. (firestore/unavailable). at createErrorFromErrorData (NativeModules.js:146) at NativeModules.js:95 at MessageQueue.__invokeCallback (MessageQueue.js:392) at MessageQueue.js:128 at MessageQueue.__guard (MessageQueue.js:291) at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:127) at t (RNDebuggerWorker.js:1)
Then I have to deinstall and reinstall the app to get the connection again.
I tried the new function
firebase.firestore().enableNetwork()
but it doesn't work.
Any ideas?
Best Qung
I encountered this error when I used a new fresh firebase project. Firestore database is also needs to be activated on the firebase console.
I encountered this error when I used a new fresh firebase project. Firestore database is also needs to be activated on the firebase console.
So I have to activate Firebase Database too? It's strange because its not reproducible when the app lost the connection. But suddenly it comes online again. In the most case after I installed the app again or restart the simulator.
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Hi, I can't solved the issue so I changed to Parse as backend. It works like a charme. Now I just use the Push Server for my App. Maybe I will try it later again.
Best Qung
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
If you are located in China, FireStore / Google is blocked there.
It'll error out with firestore/unavailable
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Hum... i face the same problem even I am not located in China
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
@Salakar We are having this issue in our production apps. Please check this

any update for this issues
Same here , it is a problem
Someone Help this happens in some times suddenly (not every time)

I've got the same problem in two different applications in production.
One possibility is that it's an error message issue.
when I'm doing .get({source: 'cachce'}) and the firebase SDK will throw
Error Domain=FIRFirestoreErrorDomain Code=14 "Failed to get document from cache. (However, this document may exist on the server. Run again without setting source to FirestoreSourceCache to attempt to retrieve the document " UserInfo={NSLocalizedDescription=Failed to get document from cache. (However, this document may exist on the server. Run again without setting source to FirestoreSourceCache to attempt to retrieve the document }
But code 14 will be translated into FIRFirestoreErrorCodeUnavailable
with error message of
The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
which is incorrect in this case.
Any solution here? It's really blocking production release.
Did you guys figure this one out? Please update if anyone did. Thanks!
I'm also having the same problem :/
I'm facing the same issue on my App in production now and then.
Non-fatal Exception: UnhandledPromiseRejection
[firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
<unknown>
Would be great to find a workaround soon.