flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

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

Open sgehrman opened this issue 1 year ago • 2 comments

This has been happening for a while, but never reported it.

I set breakpoints for All Exceptions and Uncaught Exceptions and I get this every time. Latest flutter, packages etc.

gnome-shell-screenshot-MA33P1

sgehrman avatar Jul 28 '22 23:07 sgehrman

Hey, I used the latest version and everything is working properly on web. Have you added the proper config in your main?

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );

  runApp(const MyApp());
}

Without any reproduction we will not be able to help you.

Lyokone avatar Jul 29 '22 04:07 Lyokone

Hey, I used the latest version and everything is working properly on web.

Have you added the proper config in your main?


void main() async {

  WidgetsFlutterBinding.ensureInitialized();



  await Firebase.initializeApp(

    options: DefaultFirebaseOptions.currentPlatform,

  );



  runApp(const MyApp());

}

Without any reproduction we will not be able to help you.

I had the same errors. Please see: https://github.com/firebase/flutterfire/issues/9269

My solution was to completely delete that init for web in dart and do the init in index.html.

Ahmadre avatar Aug 03 '22 10:08 Ahmadre

Hey @sgehrman. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Aug 12 '22 01:08 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@sgehrman if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Aug 23 '22 01:08 google-oss-bot