Flutter: No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp() #3677
Unanswered
dashanan13
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Steps to Reproduce
I am trying to create a separate Authentication class that has various types of authentications as functions like signInAnonymously() and onAuthStateChanged(). The aim is to manage them in one place and use them via providers, there are no UI components in this class and it is purely a Dart class. Unfortunately every compile results in same error: No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp(). I have tried to initialize it in a constructor, assign it to a variable outside the constructor, etc but the error won't go away and I can not use _firebaseAuth. Please help, this is frustrating.
Expected results:
Clear compilation and application rendering
Actual results:
[core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
Sample GitHub project hosted: https://github.com/dashanan13/time_tracker_flutter_course.git
_I can not get rid of this error no matter to how I arrange Firebase.initializeApp(). Please help_Beta Was this translation helpful? Give feedback.
All reactions