I am encountering an error related to Firebase initialization after integrating the react-native-ultimate-config package to handle multiple apps and environments in an NX Monorepo setup. The error message states: "ERROR Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp()".
This issue seems to be specific to the Android platform, as iOS is working correctly. I have provided details of my package.json, build.gradle, and the filepath for the google-services.json files. The problem arises after introducing react-native-ultimate-config into the project.
The error persists despite proper Firebase configuration and initialization. I would appreciate any guidance or insights into resolving this issue, as it hinders the proper functioning of the Android app. If there are specific configurations or workarounds needed for NX Monorepo compatibility, please provide instructions.
Steps to Reproduce:
Add react-native-ultimate-config package to the project.
Integrate Firebase for multiple apps and environments.
Run the Android app in an NX Monorepo environment.
Expected Behavior:
Firebase should be initialized successfully, and the Android app should run without encountering the mentioned error.
Actual Behavior:
The error "No Firebase App '[DEFAULT]' has been created" occurs, indicating an issue with Firebase initialization specifically on the Android platform in the presence of react-native-ultimate-config.
Additional Information:
Package versions and configurations for Firebase, NX, and related dependencies.
Any suggested workarounds or configurations that may address the issue.
Google-services Json File Path
apps/app-name/android/app/google-services.json
Build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 23
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = "1.8.20"
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
classpath 'com.google.gms:google-services:4.4.0'
}
}
allprojects {
repositories {
maven {
// https://wix.github.io/Detox/docs/introduction/project-setup
url("$rootDir/../node_modules/detox/Detox-android")
}
}
}
I am encountering an error related to Firebase initialization after integrating the react-native-ultimate-config package to handle multiple apps and environments in an NX Monorepo setup. The error message states: "ERROR Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp()".
This issue seems to be specific to the Android platform, as iOS is working correctly. I have provided details of my package.json, build.gradle, and the filepath for the google-services.json files. The problem arises after introducing react-native-ultimate-config into the project.
The error persists despite proper Firebase configuration and initialization. I would appreciate any guidance or insights into resolving this issue, as it hinders the proper functioning of the Android app. If there are specific configurations or workarounds needed for NX Monorepo compatibility, please provide instructions.
Steps to Reproduce:
Add react-native-ultimate-config package to the project. Integrate Firebase for multiple apps and environments. Run the Android app in an NX Monorepo environment. Expected Behavior: Firebase should be initialized successfully, and the Android app should run without encountering the mentioned error.
Actual Behavior: The error "No Firebase App '[DEFAULT]' has been created" occurs, indicating an issue with Firebase initialization specifically on the Android platform in the presence of react-native-ultimate-config.
Additional Information:
Package versions and configurations for Firebase, NX, and related dependencies. Any suggested workarounds or configurations that may address the issue.
Google-services Json File Path
Build.gradle
Package Json