How to fix core/duplicate-app] A Firebase App named "[DEFAULT]" already exists error
Introduction
In this article, we will cover the fix for [core/duplicate-app] A Firebase App named "[DEFAULT]" already exists exception.
If you tried running your Flutter app that's using a Firebase product you might see this error if your GoogleService-Info.plist or google-services.json files are outdated.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: [core/duplicate-app] A Firebase App named "[DEFAULT]" already exists
Solution
To fix the core/duplicate-app] A Firebase App named "[DEFAULT]" already exists exception follow these two simple steps
Delete your
google-services.jsonlocated atandroid/app/google-services.jsonif running on Android or delete yourGoogleService-Info.plistlocated atmacos/Runner/GoogleService-Info.plistif running on MacOS orios/Runner/GoogleService-Info.plistif running on IOS.Install and Run the flutterFire CLI in the root of your flutter project directory.
If flutterFire CLI is not already installed run
$ dart pub global activate flutterfire_cli
Next Run
$ flutterfire configure --project=<yourprojectID>
Follow the instructions in your terminal.
Your Flutter project should now run successfully.
Connect with me
Thank you for reading my post. Feel free to connect with me.
About the author
I am a highly dedicated Flutter developer with a strong passion for creating impactful apps that enhance productivity, streamline record-keeping, and facilitate data-driven decision making. My goal is to contribute to the success of companies by leveraging my skills in Flutter development.
Comments
Join the discussionNo comments yet. Be the first to comment.