firestore unavailable The service is currently unavailable - firebase

[Error: [firestore/unavailable] The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.]
I encountered this sudden error with the same code which worked fine yesterday
This error occurred when I tried to get data from firebase firestore
using these versions
"#react-native-firebase/app": "^14.7.0",
"#react-native-firebase/auth": "^14.7.0",
"#react-native-firebase/database": "^14.7.0",
"#react-native-firebase/firestore": "^14.7.0",
"#react-native-firebase/messaging": "^14.7.0",
"#react-native-firebase/storage": "^14.7.0",
"react": "18.0.0",
"react-native": "0.68.0",

The problem is with Android Emulator v 31.3.10
Turning off wifi in the emulator and turning on its data connection
works for me. Check these for further details.
Firebase doesn't work on Android Studio Emulator

I fixed permanently by following these steps.
Its issue with emulator version.
https://github.com/firebase/flutterfire/issues/9607#issuecomment-1263065653

Related

On a new and fresh React Native app I get this error. It is too late to set source Compatibility It has already been read to configure this project

This Error is shown when creating the Android build:
It is too late to set sourceCompatibility
It has already been read to configure this project.
Consider either moving this call to be during evaluation,
or using the variant API.
This is what i'm running: "react": "18.1.0", "react-native": "0.70.6", "react-native-navigation": "^6.4.0"
I should be able to create android builds.

Failed to load function definition from source

While running firebase emulators:start, I get this error 70% of the time:
!! functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification
But for some reason, restarting firebase emulator seems to fix that error temporarily - which leads me to believe it's not an issue with code or dependencies but more of something related to firebase emulator itself.
Any help would be appreciated.
OS & Firebase Details:
OS: Windows 11 (22H2)
Node Version: 18
Firebase CLI Version: 11.18.0
Firebase dependencies:
"firebase": "^9.16.0",
"firebase-admin": "^10.0.1",
"firebase-functions": "^4.2.0",
"firebase-tools": "^11.18.0",

React Native unable to pod install Firebase Crashlytics

During the Invertase Firebase Crashlytics setup (https://rnfirebase.io/crashlytics/ios-setup) , I continuously get the the following error:
CocoaPods could not find compatible versions for pod "Firebase/Crashlytics"
Or other variant relating to Firebase/Core or Firebase/CoreOnly
Podfile
pod 'Firebase/Core'
pod 'Firebase/CoreOnly'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
Even if I try to set each package to a specific version with ~> 6.x.x
related node modules
"#react-native-firebase/app": "^6.7.1",
"#react-native-firebase/crashlytics": "^6.7.1",
"#react-navigation/native": "^5.1.6",
react-native-firebase supports lib auto-link, which means you don't need to add
Firebase pods in Podfile manually
duan response worked for me, at least i have no errors
also, i linked this manually:
react-native link #react-native-firebase/crashlytics

react-native link gives error for react-native-firebase

I am trying to link react-native-firebase library based on the tutorial, and as soon as I run the command:
react-native link react-native-firebase
I get the following error:
Scanning folders for symlinks in
/Users/christkhodabakhshi/projects/FlashCard/node_modules (18ms)
rnpm-install info Linking react-native-firebase ios dependency
rnpm-install WARN ERRGROUP Group 'Libraries' does not exist in your
Xcode project. We have created it automatically for you.
rnpm-install ERR! Something went wrong while linking. Error: Cannot
read property 'children' of null
Please file an issue here: https://github.com/facebook/react-native/issues
Cannot read property 'children' of null
and the following is my package.json
"expo": "^29.0.0",
"expokit": "^1.5.0",
"firebase": "^5.3.0",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz",
"react-native-firebase": "^4.3.1",

Angular 5 + Firebase: Namespace 'firebase.auth' has no exported member 'IdTokenResult'

I am currently work on web project using Angular 5 and I want to integrate the Firebase Cloud Messaging to send notification on app, bt I faced to a lot of problems that I tried to fix them. Right now there two errors that I'm not able to fix concerning: Namespace 'firebase.auth' and functions
The errors look like:
ERROR in node_modules/angularfire2/auth/auth.d.ts(12,45): error TS2694: Namespace 'firebase.auth' has no exported member 'IdTokenResult'.
node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"/Users/gerardtalla/dev/workspaces/ws-parcaune/pms/pms-frontend-2018/node_modules/firebase/app/index"' has no exported member 'functions'.
How can I fix that? I'm using
Angular 5
"firebase": "4.8.0"
"angularfire2": "^5.0.0-rc.5"
"#angular/cli": "~1.7.3"
if someone has an idea do not hesitate please share with me. Thank a lot in advance.
just use "angularfire2": "5.0.0-rc.5" instead of "angularfire2": "^5.0.0-rc.5"
Run the following command:
npm i --save firebase#latest angularfire2#latest
It is version compatible issue, you can read
AngularFirebase2 Changelog
5.0.0-rc.9 (2018-05-16)
auth: Adding user and idTokenResult Observables to AngularFireAuth (#1642) (31045a9)
"angularfire2": "5.0.0-rc.6",
"firebase": "4.9.0",
I resolve this issue by making this change in package.json.
mostly it is the version problem
make this change in package.json
"angularfire2": "5.0.0-rc.6",
"firebase": "4.9.0"
These should solve the problem
I fixed it with this.
"firebase": "^5.7.0",
"angularfire2": "5.0.0-rc.6",
I got the same error, remove folder in node_modules and reinstall firebase fixed my problem.
npm install --save firebase
mostly it is the version problem, check version using npm list, or try downgrade to the following the error should gone
angular: 4
angularfire2: "^5.0.0-rc.3"
firebase: "4.13.1"
Try this out
npm install --save firebase #angular/fire -f

Resources