I've been running updates on my project lately and for some unknown reason I'm starting to get this error.
Here's my build.gradle file :
apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* entryFile: "index.android.js",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
def keyStorePropertiesFile = rootProject.file("deployment/keystore.properties")
def keyStoreProperties = new Properties()
keyStoreProperties.load(new FileInputStream(keyStorePropertiesFile))
android {
compileSdkVersion 26
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "co.corva"
minSdkVersion 16
targetSdkVersion 22
versionCode 10
versionName "0.6.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
release {
keyAlias keyStoreProperties['keyAlias']
keyPassword keyStoreProperties['keyPassword']
storeFile rootProject.file(keyStoreProperties['storeFile'])
storePassword keyStoreProperties['storePassword']
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
compile project(':react-native-sentry')
compile project(':react-native-image-picker')
compile project(':react-native-photo-view')
compile project(':react-native-device-info')
compile project(':react-native-camera')
compile project(':react-native-contacts')
compile project(':react-native-sms')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile (project(':react-native-maps')) {
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
compile(project(':react-native-firebase')) {
transitive = false
}
compile(project(':react-native-device-info')) {
exclude group: 'com.google.android.gms', module: 'play-services-gcm'
}
compile ('com.google.android.gms:play-services-base:11.2.0') {
force = true;
}
compile ('com.google.android.gms:play-services-maps:11.2.0') {
force = true;
}
compile ('com.google.android.gms:play-services-gcm:11.2.0') {
force = true;
}
compile ('com.google.android.gms:play-services-vision:11.2.0') {
force = true;
}
compile "com.google.firebase:firebase-core:11.2.0"
compile "com.google.firebase:firebase-messaging:11.2.0"
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
@Rewieer could you provide us the full error + stack trace - so we can see where exactly the error is occurring, thanks
Solved the issue by removing xmlns:tools="http://schemas.android.com/tools"
and tools:node="replace"
from my AndroidManifest.xml, thanks you !
See this for more information
I have the same problem on ios (
^ Ditto on iOS.
Try rolling back to 3.2.0 for now.
@Salakar @Rewieer can it be reopened? Seems to be not fixed (iOS & Android).
React-native: 0.52.2
React-native-firebase: 3.2.0
I've reopened it.
@StepanNaryshkov @toblerpwn @theohdv It sounds like your iOS project doesn't have the .plist file linked correctly - that's the only reason why the default project wouldn't be initialised.
Have you updated your version of React Native recently? If so, I'd check that you haven't overridden the linking to the .plist file.
Yes it was linked to the recent update of react native in my project. Fixed now.
React-native 0.52.2
react-native-firebase 3.2.0
Ok, in which case I'm going to close this issue again.
@theohdv when i remove tools:node="replace"
I got this error
`* What went wrong:
Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(26.0.1) from [com.android.support:exifinterface:26.0.1] AndroidManifest.xml:25:13-35
is also present at [com.android.support:appcompat-v7:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' toelement at AndroidManifest.xml:23:9-25:38 to override.
`
I didn't have to remove anything and it works (be sure to remove and reinstall npm package, link native package, remove cache ...). Ask @Rewieer, about this hack.
@Rewieer
How can i fix this issue ,
with react-native-camera
i can't remove tools:node="replace"
and if this line exist in AndroidManifest i have this error
The [[DEFAULT]] firebase app has not been initialized!
@Kottidev to be honest idk anymore, I ditched RNC out of my project because it wasn't working on Honor phones and made my own implementation.
But I believe this is a dependency error. See #48 and try to see various settings. As far as I remember I think it was something to do with the vision API (a dependency of the new RNC)
Although 'wanted version' of react-native is 0.51, it happens to me on 0.51. (iOS)
I updated RN to 0.53 and problem is resolved. (iOS)
I resolved this issue by downloading a new version of google-services.json
(some changes had been made to the bundle identifier that needed to match up with google) and was the key: a dev had commented out apply plugin: 'com.google.gms.google-services'
from the end of app/build.gradle
for debugging. Uncommenting that got it working again.
@ntomallen I can confirm that downloading a new version of GoogleService-Info.plist
, replacing the file in your ios
directory, and rebuilding does the trick on iOS, as well.
Thanks!
I had the same issue for ios, my mistake was I forgot a step during the installation:
B) At the beginning of the didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method add the following line:
[FIRApp configure];
When you come to an issue trying to find help, but you realize you already had the same problem a month ago on a different platform
Yeah, @Kottidev is right. I have the same issue right now. I am using RNC (camera) & RNF together at the same time.
xmlns:tools="http://schemas.android.com/tools" and tools:node="replace"
=>
The [[DEFAULT]] firebase app has not been initialized!
Damn it! I have spent ~6 hours to understand the source of a problem.
@apoterenko how did you fix the issue?
Hi everyone I have the same error I am trying to get the phone auth example working [PhoneAuthTest.js] from the documantation
Here is the error i am getting
Error:
``` The [[DEFAULT]] firebase app has not been initialized!
This error is located at:
in PhoneAuthTest (at navigationStore.js:319)
in Wrapped (at SceneView.js:31)
in SceneView (at CardStack.js:412)
in RCTView (at View.js:78)
in View (at CardStack.js:411)
in RCTView (at View.js:78)
in View (at CardStack.js:410)
in RCTView (at View.js:78)
in View (at createAnimatedComponent.js:147)
in AnimatedComponent (at Card.js:26)
in Card (at PointerEventsContainer.js:55)
in Container (at CardStack.js:454)
in RCTView (at View.js:78)
in View (at CardStack.js:383)
in RCTView (at View.js:78)
in View (at CardStack.js:382)
in CardStack (at CardStackTransitioner.js:97)
in RCTView (at View.js:78)
in View (at Transitioner.js:192)
in Transitioner (at CardStackTransitioner.js:49)
in CardStackTransitioner (at StackNavigator.js:60)
in Unknown (at createNavigator.js:52)
in Navigator (at createNavigationContainer.js:210)
in NavigationContainer (at SceneView.js:31)
in SceneView (at DrawerScreen.js:40)
in DrawerScreen (at withCachedChildNavigation.js:66)
in withCachedChildNavigation(DrawerScreen) (at DrawerNavigator.js:106)
in Unknown (at createNavigator.js:52)
in Navigator (at DrawerView.js:215)
in RCTView (at View.js:78)
in View (at DrawerLayoutAndroid.android.js:186)
in AndroidDrawerLayout (at DrawerLayoutAndroid.android.js:200)
in DrawerLayoutAndroid (at DrawerView.js:195)
in DrawerView (at DrawerNavigator.js:127)
in Unknown (at createNavigator.js:52)
in Navigator (at createNavigationContainer.js:210)
in NavigationContainer (at SceneView.js:31)
in SceneView (at CardStack.js:412)
in RCTView (at View.js:78)
in View (at CardStack.js:411)
in RCTView (at View.js:78)
in View (at CardStack.js:410)
in RCTView (at View.js:78)
in View (at createAnimatedComponent.js:147)
in AnimatedComponent (at Card.js:26)
in Card (at PointerEventsContainer.js:55)
in Container (at CardStack.js:454)
in RCTView (at View.js:78)
in View (at CardStack.js:383)
in RCTView (at View.js:78)
in View (at CardStack.js:382)
in CardStack (at CardStackTransitioner.js:97)
in RCTView (at View.js:78)
in View (at Transitioner.js:192)
in Transitioner (at CardStackTransitioner.js:49)
in CardStackTransitioner (at StackNavigator.js:60)
in Unknown (at createNavigator.js:52)
in Navigator (at createNavigationContainer.js:210)
in NavigationContainer (at SceneView.js:31)
in SceneView (at CardStack.js:412)
in RCTView (at View.js:78)
in View (at CardStack.js:411)
in RCTView (at View.js:78)
in View (at CardStack.js:410)
in RCTView (at View.js:78)
in View (at createAnimatedComponent.js:147)
in AnimatedComponent (at Card.js:26)
in Card (at PointerEventsContainer.js:55)
in Container (at CardStack.js:454)
in RCTView (at View.js:78)
in View (at CardStack.js:383)
in RCTView (at View.js:78)
in View (at CardStack.js:382)
in CardStack (at CardStackTransitioner.js:97)
in RCTView (at View.js:78)
in View (at Transitioner.js:192)
in Transitioner (at CardStackTransitioner.js:49)
in CardStackTransitioner (at StackNavigator.js:60)
in Unknown (at createNavigator.js:52)
in Navigator (at createNavigationContainer.js:210)
in NavigationContainer (at Router.js:70)
in App (at Router.js:91)
in Router (at index.js:30)
in StyleProvider (at index.js:29)
in PersistGate (at index.js:25)
in Provider (at index.js:24)
in Root (at App.js:8)
in App (at renderApplication.js:35)
in RCTView (at View.js:78)
in View (at AppContainer.js:102)
in RCTView (at View.js:78)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:34)
app
getModule
moment.js:782:4
componentDidMount
moment.js:256:20
proxiedComponentDidMount
createPrototypeProxy.js:61:45
commitLifeCycles
ReactNativeRenderer-dev.js:10102:12
commitAllLifeCycles
ReactNativeRenderer-dev.js:11472:25
invokeGuardedCallback
ReactNativeRenderer-dev.js:39:15
invokeGuardedCallback
ReactNativeRenderer-dev.js:221:34
commitRoot
ReactNativeRenderer-dev.js:11585:32
completeRoot
ReactNativeRenderer-dev.js:12795:46
performWorkOnRoot
ReactNativeRenderer-dev.js:12745:23
performWork
ReactNativeRenderer-dev.js:12660:26
performSyncWork
ReactNativeRenderer-dev.js:12622:16
batchedUpdates
ReactNativeRenderer-dev.js:12840:8
batchedUpdates
ReactNativeRenderer-dev.js:2511:27
_receiveRootNodeIDEvent
ReactNativeRenderer-dev.js:2647:17
receiveTouches
ReactNativeRenderer-dev.js:2723:28
__callFunction
MessageQueue.js:353:47
MessageQueue.js:118:26
__guardSafe
MessageQueue.js:316:6
callFunctionReturnFlushedQueue
MessageQueue.js:117:17
Here is my android gradle related information
> build.gradle
```apply plugin: "com.android.application"
import com.android.build.OutputFile
/**
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
* and bundleReleaseJsAndAssets).
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* entryFile: "index.android.js",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 26
buildToolsVersion '27.0.3'
dexOptions {
jumboMode true
}
defaultConfig {
applicationId "com.ecomm"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation project(':react-native-vector-icons')
implementation(project(':react-native-firebase')) {
transitive = false
}
implementation project(':react-native-device-info')
// Firebase dependencies
implementation "com.google.android.gms:play-services-base:15.0.0"
implementation "com.google.firebase:firebase-core:15.0.2"
implementation "com.google.firebase:firebase-messaging:15.0.2"
implementation "com.google.firebase:firebase-auth:15.1.0"
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:26.1.0"
implementation "com.facebook.react:react-native:0.54.2" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
build.gradle (project)
```// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
ext {
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = "27.0.3"
supportLibVersion = "26.1.0"
googlePlayServicesVersion = "15.0.0"
androidMapsUtilsVersion = "0.5+"
}
```
I have double checked the google-services.json
Android Manifest has no tool/tools
"react-native": "0.54.2"
"react-native-firebase": "4.0.5"
Thank you in advance
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
Okey So i figured out the problem
apply plugin: "com.google.gms.google-services"
was missing in build.gradle
It was a silly mistake from my part
I've gone through these steps and possible solutions relentlessly but still am finding myself with this issue.
After digging deeper it looks like this line is the culprit
List
from RNFirebaseModule.java
Currently for me it only returns zero
@derekbar90 Did you ever find a solution?
I have a same error:
I use:
"react-native": "^0.55.4",
"react-native-firebase": "^4.2.0",
any solution?
I have the same issue like @nguyenngoi , i find the document https://github.com/invertase/react-native-firebase-docs/blob/master/docs/core/initialize-apps.md
My test platform is Android.
My androidConfig
clientId and appId i copy them from google-services.json. And the other arguments just copy them from Firebase console in Javascript project.
Finally it can be initialized from the code:
const firebaseApp = firebase.initializeApp(
Platform.OS === 'ios' ? iosConfig : androidConfig,
'test_fire'
);
I test it on email auth successfully.
But I still has a problem in my terminal message shows Deprecation: Calling 'initializeApp()' for apps that are already initialised natively is unnecessary, use 'firebase.app()' instead to access the already initialized default app instance.
I try to use the code it will show error Firebase has not been initialized
import firebase from 'react-native-firebase';
const firebaseApp = firebase.app('test_fire');
Any one has solution ?
I was able to solve this error of my own on iOS by including this line in the AppDelegate.m
at the top of the launchOptions
method:
[FIRApp configure];
@johnlk thank you, I had the same issue for ios.
Your solution work for me.
I had the same issue for ios, my mistake was I forgot a step during the installation:
B) At the beginning of the didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method add the following line: [FIRApp configure];
`#import "AppDelegate.h"
@implementation AppDelegate
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"ykstyt"
initialProperties:nil
launchOptions:launchOptions];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
@end
`
AppDelegate.m file in this way but not working!
React-native run-ios after "Build successful" but xCode in Thread1: 'Signal SIGABRT' error?
Link your library again && Delete duplicated lines in build.gradle and main java && check installation document exactly && re run your project
this solved my same issue
Hello,
I actually have the same issues but only when I call this when I try to determine if an user is already logged in or not :
firebase.auth().onAuthStateChanged(user => {
this.props.navigation.navigate(user ? 'Main' : 'SignUp')
})
This is called inside the following function which is the first function of my class in the entry point file :
componentDidMount() { }
Here the error message in case of :
Error : The [[DEFAULT]] firebase app has not been initialized
with some more log about where is it located : in Loading / SceneView / SwitchView / in Navigator
And when I comment this very line, no more error about this.
Should I use :
const firebaseApp = firebase.initializeApp(
Platform.OS === 'ios' ? iosConfig : androidConfig,
'test_fire'
);
And if yes in which file ? Index or first entry point file (most likely App.js) ?
thanks in advance
You miss file GoogleService-Info.plist in project
Just add it
@rewieer
How can i fix this issue ,
with
react-native-camera
i can't removetools:node="replace"
and if this line exist in AndroidManifest i have this error
The [[DEFAULT]] firebase app has not been initialized!
For anyone else in this situation, I managed to resolve the issue by changing tools:node="replace"
to tools:replace="android:allowBackup"
.
This did not cause any issues with react-native-camera
Heads up: This error is raised in Android with classpath 'com.android.tools.build:gradle:3.3.0'
, last working version is classpath 'com.android.tools.build:gradle:3.2.1'
, affects versions 5.1.x, 5.2.x/ Please reopen!
Newer version of Android studio 3.3.1 requires a higher version of Gradle plugin that no longer supports react-native-firebase it seems (And some other libraries). I'm seeing this error on a dummy project following the instructions and the steps/fixes here. Any ideas?
I downgraded to 'com.android.tools.build:gradle:3.3.0' and it still doesn't work. I get this error.
@voidstarfire Do you really need to downgrade android studio too? Where you able to find a workaround for this?
ExceptionsManager.js:82 Unhandled promise rejection Error: The [[DEFAULT]] firebase app has not been initialized!
at Object.app (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:134504:23)
at Firebase.getModule [as admob] (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:134608:24)
at Player.loadFullScreenAd$ (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:146553:54)
at tryCatch (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:21907:19)
at Generator.invoke [as _invoke] (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:22082:24)
at Generator.prototype.(anonymous function) [as next] (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:21950:23)
at tryCatch (blob:http://localhost:8081/05b6b8f8-5e30-4309-b53c-c799bc26206d:21907:19)
at invok
OK i resolved my issue by using the firebase/android studio integration to sync my google-service.json file and add admob to my build.gradle files
Thanks @Debarshi-Banerjee
incompatible with RN 0.59 gradle 3.3.1, please reopen!
@iamswain25 I got it working on RN 0.59 by upgrading com.google.gms:google-services to 4.2.0.
@otaviosoares by upgrading com.google.gms:google-services to 4.1.0 to 4.2.0 I start getting another error... damn this is hard.
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1.3.1
,2.3]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.nimbusds:nimbus-jose-jwt:5.1 -> net.minidev:json-smart@[1.3.1,2.3], but json-smart version was 2
.3.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends on project 'react' which depends onto net.minidev:[email protected]
-- Project 'app' depends on project 'react' which depends onto com.nimbusds:[email protected]
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
@Fsarmento Do you have code-push installed?
I had the same problem. Check https://github.com/Microsoft/react-native-code-push/issues/1448
Fascinating @otaviosoares - @Fsarmento looks like you have to disable strict version checking until an upstream bug is fixed https://github.com/Microsoft/react-native-code-push/issues/1448#issuecomment-469902328
after initialize on AppDelegate.m don't forget download and copy google-info.plist to ios/appName
Hi Guy,
I'm following your instructions but i have an issue when install the app, it will crash without any reason here is my config and deps:
"react-native-firebase": "^5.3.1",
@Ethan0007 , Did you start the react native metro bundler?
Please use react-native start
command on your project root directory.
After it's done, restart your app.
I have the same issue like @nguyenngoi , i find the document https://github.com/invertase/react-native-firebase-docs/blob/master/docs/core/initialize-apps.md
My test platform is Android.
My
androidConfig
clientId and appId i copy them from google-services.json. And the other arguments just copy them from Firebase console in Javascript project.Finally it can be initialized from the code:
const firebaseApp = firebase.initializeApp( Platform.OS === 'ios' ? iosConfig : androidConfig, 'test_fire' );
I test it on email auth successfully.
But I still has a problem in my terminal message shows
Deprecation: Calling 'initializeApp()' for apps that are already initialised natively is unnecessary, use 'firebase.app()' instead to access the already initialized default app instance.
I try to use the code it will show error
Firebase has not been initialized
import firebase from 'react-native-firebase'; const firebaseApp = firebase.app('test_fire');
Any one has solution ?
Did you find solution for this?!
Make sure
apply plugin: 'com.google.gms.google-services'
goes to the bottom of android/app/build.gradle
, not android/build.gradle
This issue no longer is focused on any particular problem. For future searchers, if you see this it is always an install error of some sort
We see these so often I created a script that goes from zero to a working firebase app on android and ios. Do what it does and your install should work, or at the very least you'll know it's not react-native-firebase:
https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh
Most helpful comment
When you come to an issue trying to find help, but you realize you already had the same problem a month ago on a different platform
