close

[Fixed] Error: No Firebase App ‘[DEFAULT]’ has been created – call Firebase App.initializeApp()

Today We are Going To Solve Error: No Firebase App ‘[DEFAULT]’ has been created – call Firebase App.initializeApp() in flutter. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix Error: No Firebase App ‘[DEFAULT]’ has been created – call Firebase App.initializeApp() Error?

  1. How to Fix Error: No Firebase App '[DEFAULT]' has been created – call Firebase App.initializeApp() Error?

    To Fix Error: No Firebase App '[DEFAULT]' has been created – call Firebase App.initializeApp() Error just Use .initializeApp(). Just keep in mind that the all calls to firebase must come after .initializeApp(); You can see this in the below code. Just use it in that way: firebase.initializeApp(config); var db = firebase.firestore();

  2. Error: No Firebase App '[DEFAULT]' has been created – call Firebase App.initializeApp()

    To Fix Error: No Firebase App '[DEFAULT]' has been created – call Firebase App.initializeApp() Error just Change the implementation order of firebase. To solve this error you have to just change the implementation order of firebase and main.dart.js

Solution 1 : Use .initializeApp()

Just keep in mind that the all calls to firebase must come after .initializeApp(); You can see this in the below code. Just use it in that way:

firebase.initializeApp(config);
var db = firebase.firestore();

Solution 2 : Change the implementation order of firebase

To solve this error you have to just change the implementation order of firebase and main.dart.js

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read These Solutions

Leave a Comment