Flutter error: No Firebase App ‘[DEFAULT]’ has been created

Last updated on March 23, 2023 A Goodman Loading... Post a comment
Table Of Contents


When working with Flutter and Firebase, you may fall into the following error:

No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()

Don’t panic. We will tackle this bug.


Before using any Firebase services, you have to initialize the Firebase app by calling Firebase.initializeApp(). Only one time, no more, no less.

The solution to fix the mentioned problem and make sure it won’t happen again is quite simple. All you need to do is open the main.dart file and change from this:

void main(){

To this:

// Import the Firebase Core package
import 'package:firebase_core/firebase_core.dart';

// Add async/await and 2 lines of code to the main function
void main() async {
  await Firebase.initializeApp();

If you call Firebase.initializeApp() somewhere else, remove it. After that, completely restart your Flutter app and check the result.

Further reading:

You can also take a tour around our Flutter topic page and Dart topic page to see the latest tutorials and examples.

Notify of
Inline Feedbacks
View all comments

Related Articles