Skip to content

Latest commit

History

History
68 lines (36 loc) 路 2.09 KB

File metadata and controls

68 lines (36 loc) 路 2.09 KB

[core/duplicate-app] A Firebase App named "[DEFAULT]" already exists

Have you ever encountered this error when running your Flutter app on iOS or macOS?

[core/duplicate-app] A Firebase App named "[DEFAULT]" already exists

The first time it happened to me, it took me hours to figure it out. 馃槫

But as it turns out, there's an easy solution. 馃憞


First of all, just know that this issue is showing up quite a bit on StackOverflow and GitHub.

There are multiple reasons you may encounter it.

But none of the solutions I found online worked for me:


Here's what went wrong in my case.

I had two separate Firebase projects using THE SAME iOS (or macOS) bundle ID.

As a result, the Dart initialization code couldn't decide which Firebase project to use.

FYI, here's where to find the iOS bundle ID. 馃憞


If you find yourself in the same situation, the easiest solution is to specify a "name" parameter when calling Firebase.initializeApp().

And give it the Firebase project ID as an argument. 馃憞


Once again, this will solve the problem if you have two or more Firebase projects using THE SAME iOS (or macOS) bundle ID.

But it's not the only reason you may get this error.

I just wanted to share this as it may save you a few hours of frustration. 馃ゲ


If you wanna dive deeper into Firebase, check out my new course, where you'll build a full-stack eCommerce app and learn about all the most important Firebase features. 馃憞


Found this useful? Show some love and share the original tweet 馃檹


Previous Next
Firebase Auth flow in 5 minutes Creating an empty Flutter project