-
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
[🐛] Metro error: No Firebase App '[DEFAULT]' has been created - call firebase.initializeApp() #8395
Comments
looks promising that you've got the react-native-firebase plugins in there You cut out most of your package.json so I can't see what Expo you are on - I think we support the new AppDelegate.swift with the expo config plugin now, as of 21.9.0 in fact (6a7867c) so it should be working Looks to me like a project configuration / setup / install issue somehow - I'd triplecheck everything to make sure that config plugin is executing as it should be processing the ios AppDelegate file and adding the call to configure that handles this If it's working in dev that's a strong hint that it should be working, I don't know what the difference is on EAS build, you might contact Expo support since dev builds are working - they may know more about dev build -> EAS build/archive difference |
Same error |
I am using this packages:
Also, there are no differences between the Xcode archive and the eas build. I am still getting the same errors. I rebuilt it for development and everything works fine. I am trying to archive and send it to the Testflight but I can't get the archive build. |
I hear what you are saying, however I don't personally use Expo - sorry - so I'm just not aware of what the differences are between a dev build and whatever Expo does for a production / archive build. I understand this seems a bit like passing the buck however, please consider:
I'm not sure how we can be responsible for build variations between dev and archive in an Expo context. That feels like an Expo issue to me |
@mikehardy
I can't have a build. What do you recommend? |
doesn't look like that to me. just because it's a stack frame doesn't mean it's a cause. Looks to me like whatever unknown thing EAS is doing to build, it's not applying the That's my hunch. Root cause though? No idea. Please don't ignore this - it's my best advice:
|
I'm facing this issue in the (non expo) react native app in the iOS only (works fine in android) even in the debug mode. Currently, Using version react-native: 0.75.2 |
Hey there @SulthanNK can you please try upgrading your Firebase and seeing if the issue persists as that is quite an old version. |
Hey there @furkananter I have always found things to be a bit finicky on expo. I see you said you are not using initializeApp(), can I please get you to try it with that? |
@SulthanNK if you would like to see a correctly integrated project you should read + try executing this demo build script that starts from scratch using the react-native CLI to create a bare project then integrate react-native-firebase following all our documentation. The end result is an integration that works on iOS, every time. It may help you diagnose what went wrong with your integration if you compare the steps the scripts takes vs what you have done or not done -- https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh |
Same issue, I was using react native 0.72.4 version without any problems, but when I upgraded to 0.77.1, this problem started to occur.
|
@grkemtneri same general solution if this is also on iOS like the OP (if it is not, you have a different problem) - carefully examine your AppDelegate implementation to make sure you are importing Firebase and that you call Firebase |
any updates ? Did anyone manage to find a solution? |
@davortrifunov no one has posted what their AppDelegate implementation looks like, so there is no real information to go on - just a complaint that things aren't working - that's not enough to find a solution unfortunately |
This comment has been minimized.
This comment has been minimized.
If you are using the CLI then you are a perfect candidate for examining + comparing with your project the result of this https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh Just ran it this morning. Zero issues, starting from scratch with the CLI, on the versions you indicate. Not sure what is going on with your project without examining every bit of it unfortunately, and that's impractical given ratio of "people doing support" vs "people using react-native-firebase" - so checking the result of that "definitely works" build is the fastest way to resolution for you I think |
Hey @mikehardy, thanks for the link, it took me a while to realize that I had to use xcode to move How I wish there could update the documentation at https://rnfirebase.io/ to reflect the recent changes(moving from obj-c to swift)! |
We'll have the update to the docs for swift soon - there's a PR lodged already Really glad you found the underlying issue - if you saw the tricks I had to do in the script to automate the addition of that file 😆 - easier to do manually in fact, but then it wouldn't be a script. Cheers |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Docs for AppDelegate.swift have been integrated. I still reproduce no issues in my build reproducer. Anyone still seeing this needs to very very very carefully examine their integration in the context of our installation documents, and/or consult my script at https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh (it has comments! they explain everything!) to make sure you have done everything. If you get this error, you have integrated things incorrectly but it will most likely be specific to your project and the most likely response will be for you to run https://github.com/mikehardy/rnfbdemo/blob/main/make-demo.sh and make sure it works - if it does, it's your project and you will have to find the problem, we can't find it for you as we do not have infinite time for project-specific troubleshooting Thanks for your understanding |
Hi, I am getting this error while trying to eas build (production) and Xcode Archive.
Development Build has no issues. Everything looks like it was expected.
My app.json looks like this:
Packages:
Can you please help? I am not using initializeApp in anywhere.
The text was updated successfully, but these errors were encountered: