-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[🐛] 🔥 [runtime not ready]: Error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp() [RN -0.78] [iOS only] #8461
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
Comments
This has been brought up a few times, but I've never reproduced it locally. Last time someone brought this up, they hadn't properly added their GoogleServices-Info.plist to their project, could be that? |
I could get the app Initialized from the script running, but it still doesnt fix my issue @mikehardy |
We're not able to fix every project-specific problem for every project, that's an unrealistic expectation given it's an infinite demand for support on a limited support resource. We can prove it can work, and we can show you how in a reproducible way - which we have done - and by comparison with your project you can find the integration error in your project |
@mikehardy I dont intend so. But i have run the script compared it with my project files (focused more on comparing Pods, Gemfile and AppDelegate, but could not find any major deviations. Are there any more file or areas that u suggest i might need to check? |
Read the entire script, it's well commented, and verify every single item |
If you are using
However, in Expo 53, this pattern has been replaced with:
The Firebase plugin uses a regex pattern to find where to insert Solution:
This is a temporary workaround until the Firebase plugin is updated to support the new AppDelegate structure in Expo 53. The issue is in the plugin's regex pattern that's looking for the old structure. |
@haddad-yacine Do you have a patch for this and are you seeing it on Android as well with |
No, I only see that in iOS, as I said, I just add the |
@haddad-yacine Okay I'm having some issues on Android with this as well after upgrading to |
@iM-GeeKy I just rechecked the android build, and it's working fine, so it's working in both iOS and Android, just make sure to clean the project before prebuilding, remove node modules and yarn lock file. |
@haddad-yacine I'm not using |
The PR #8490 adds auth support, but SDK 53 initialization is still failing for the core package You can also see
during the prebuild phase. The patch is pretty easily done by changing the regular expression to
I'm preparing a PR now. |
The PR draft is here: A temp patch is here: diff --git a/plugin/build/ios/appDelegate.js b/plugin/build/ios/appDelegate.js
index c1e95803368b6b6bb1ddf9cdcbdade2a8a91a664..90c8660a486061f8b1835fc7a88a8bb6d66ef735 100644
--- a/plugin/build/ios/appDelegate.js
+++ b/plugin/build/ios/appDelegate.js
@@ -61,7 +61,7 @@ function modifyObjcAppDelegate(contents) {
}
function modifySwiftAppDelegate(contents) {
const methodInvocationBlock = `FirebaseApp.configure()`;
- const methodInvocationLineMatcher = /(?:self\.moduleName\s*=\s*"([^"]*)")/g;
+ const methodInvocationLineMatcher = /(?:self\.moduleName\s*=\s*"([^"]*)")|(?:reactNativeFactory\?\.\s*startReactNative)/;
// Add import
if (!contents.includes('import FirebaseCore')) {
contents = contents.replace(/import Expo/g, `import Expo
|
Issue
Got this issue while upgrading react native version to 0.78, i have tried cleaning the project, node_modules, yarn cache and Pods and podfile.lock. Also my AppDelegate.swift has
import FirebaseCore
andFirebaseApp.configure()
which i saw were solutions to a similar issue that was reporeted. Could get the app running fine on android.Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:AppDelegate.swift
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:21.13.0
Firebase
module(s) you're using that has the issue:e.g. crashlytics, messaging
TypeScript
?N
The text was updated successfully, but these errors were encountered: