react-native-firebase icon indicating copy to clipboard operation
react-native-firebase copied to clipboard

Error: Firestore: The service is currently unavailable. (firestore/unavailable).

Open quandevelopment opened this issue 8 years ago • 67 comments

Issue

Environment

  1. Application Target Platform: Android

  2. Development Operating System: macOs HighSierra

  3. Build Tools:

  4. React Native version: 0.56.0

  5. React Native Firebase Version: 4.3.7

  6. Firebase Module: Firestore

  7. 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

quandevelopment avatar Aug 29 '18 12:08 quandevelopment

I encountered this error when I used a new fresh firebase project. Firestore database is also needs to be activated on the firebase console.

alican-k avatar Sep 12 '18 19:09 alican-k

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.

quandevelopment avatar Sep 14 '18 06:09 quandevelopment

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.

stale[bot] avatar Oct 12 '18 06:10 stale[bot]

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

quandevelopment avatar Oct 12 '18 10:10 quandevelopment

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.

stale[bot] avatar Nov 09 '18 11:11 stale[bot]

If you are located in China, FireStore / Google is blocked there.

It'll error out with firestore/unavailable

zhigang1992 avatar Nov 14 '18 00:11 zhigang1992

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.

stale[bot] avatar Dec 12 '18 01:12 stale[bot]

Hum... i face the same problem even I am not located in China

anhtuank7c avatar Dec 12 '18 09:12 anhtuank7c

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.

stale[bot] avatar Jan 09 '19 12:01 stale[bot]

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.

stale[bot] avatar Jan 23 '19 12:01 stale[bot]

@Salakar We are having this issue in our production apps. Please check this
screenshot 2019-03-08 at 1 48 43 pm

SasiKumar-Ramesh avatar Mar 08 '19 08:03 SasiKumar-Ramesh

any update for this issues

haitranhuy avatar Sep 21 '19 03:09 haitranhuy

Same here , it is a problem

pitchourou avatar Nov 11 '19 22:11 pitchourou

Someone Help this happens in some times suddenly (not every time)

image

joeljerushan avatar Nov 21 '19 14:11 joeljerushan

I've got the same problem in two different applications in production.

ts-ign0re avatar Jan 14 '20 06:01 ts-ign0re

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.

zhigang1992 avatar Feb 19 '20 03:02 zhigang1992

Any solution here? It's really blocking production release.

thegrucoder avatar Mar 16 '20 01:03 thegrucoder

Did you guys figure this one out? Please update if anyone did. Thanks!

ghost avatar Apr 13 '20 13:04 ghost

I'm also having the same problem :/

quantux avatar Apr 14 '20 20:04 quantux

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.

brandtnewlabs avatar May 04 '20 07:05 brandtnewlabs