-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] No Firebase app '[DEFAULT]' has been created - call firebase.initializeApp(), js engine: hermes #2701
Comments
I don't think hermes is working correctly with RNFB, as a side note I think you're missing this part from RN59 to RN60 move https://github.com/facebook/react-native/blob/master/template/android/settings.gradle |
Mike, thank you again! Changes i also made android/build.gradle
|
I think they are on 4.3.2 now :-), gradle/android studio is on 3.5.1 nothing like keeping track of 4 ecosystems (ios / android / react-native / firebase) at once right? |
^ Thank you
^ Literally living the dream |
i am having the same issue with ios build. Any idea what caused it?? |
@aravi365 i never experienced this on IOS. have you done a fresh pod install?
What the above does is:
|
But, the solution you've given mainly points out to android related. My android is working fine without any issues. |
@aravi365 Sorry, that wasn't a solution it was more of a process i take before i go looking for an answer just to make sure my project has not got anything weird and quirky going on within it. If you skipped the IOS related parts of your upgrade, during the upgrade then i'd go back with a fine-toothed comb and check incase theres anything lurking within the code that you are missing. |
npx react-native-clean-project clean-project-auto 99 percent of the time it works every time haha |
There is an obvious spelling error there since I was on mobile, sorry, fixed. |
I spent a lot of hours for found who was the problem, I fixed that adding |
@1fabiopereira not only the best approach, but the documented method of integrating https://invertase.io/oss/react-native-firebase/quick-start/android-firebase-credentials#applying-the-config-file https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh#L37 This is a very tough module to set up correctly because it's really like 15 big modules in one. Using the docs is vital for success |
@mikehardy I tried this, but then I get this error
This stackoverflow answer has you delete that line, which causes the error again :/ EDIT: https://stackoverflow.com/a/39301178 this answer fixed it! |
i have recently install @react-native-firebase/app v6.3.3 try to configure in react-native v 0.61.5 AND WHEN I TRIED TO ADD com.google.gms.google-services getting message of no plugin found and when i configure from web sdk to i got error of [firebase default app has been created ] please help me out of this |
@jegolopopo clone this repo, read this script, run the script and watch what it does. At the end you will have a fresh throw-away app to inspect, built from scratch, that runs. https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh - it helps a lot of people new to the project see what it takes to integrate things and how things are supposed to look |
Apply -> apply plugin: "com.google.gms.google-services" @ Top |
@aeliusventure indeed - the script has moved but it is this line: |
I'm trying to have GMS and HMS in separated flavors, adding something like
at the bottom of build.gradle. I'd like to install Firebase only in gms flavor, but I have no idea how to handle it. |
This sounds like it would be better as a stackoverflow question with firebase and firebase-android-sdk tags, or a question on the firebase-android-sdk repo. We have no experience with it here, sorry. I will say that the google-services plugin is just a convenience. All it's doing is carrying the google firebase JSON config into the app. There is nothing stopping you from eliminating that step completely and initializing your app manually at startup after detecting if you have GMS or HMS available. |
go to build phases in xcode
|
@syedamirali14 But I use |
it surely helped, thanks :) 👍🏻 |
not understand |
I was applying plugin in the android/build.gradle instead of android/app/build.gradle |
It worked for me thanks |
most setup issues such as
default app has not been initialized
etc are all down to an incorrect setup as the guides haven't been correctly followed.^ I am pretty certain i've gone through the correct setup.
Issue
During my upgrade migration to
RN 0.61.2
from0.59.10
i had to upgrade a few dependancies - RNFB being one of them.IOS is building fine.
Android builds fine but then i am greeted with an error.
I have one file that calls/uses firebase.
Analytics.js
const FirebaseAnalytics = analytics();
is what triggers my error.android/settings.gradle
android/app/build.gradle
I tried adding
to the dependancies Object but no-dice.
Project Files
android/build.gradle
android/app/build.gradle
MainApplication.java
AppManifest.xml
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?react-native-firebase
version you're using that has this issue:"@react-native-firebase/app": "^6.0.1",
Firebase
module(s) you're using that has the issue:"@react-native-firebase/in-app-messaging": "^6.0.1",
"@react-native-firebase/messaging": "^6.0.1",
"@react-native-firebase/analytics": "^6.0.1",
TypeScript
?N
The text was updated successfully, but these errors were encountered: