# Flutter: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()

**Code:** `No Firebase App '[DEFAULT]' has been created` · **Category:** Flutter / Dart · **Seen on:** Flutter, Google Cloud

A Firebase service was used before `Firebase.initializeApp()` ran and completed.

## Meaning

Initialise Firebase in `main()` before `runApp`, after `WidgetsFlutterBinding.ensureInitialized()`, and `await` it. Add `DefaultFirebaseOptions.currentPlatform` from FlutterFire CLI. In isolates or background handlers initialise again.

## Common causes

- initializeApp not called or not awaited
- Missing WidgetsFlutterBinding.ensureInitialized()
- Background message handler isolate not initialised
- Missing google-services.json / GoogleService-Info.plist
- Platform options not generated by FlutterFire CLI

## Quick fix

1. Call `await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);` in main
2. Run `flutterfire configure`
3. Initialise in background isolate handlers too

## Detailed fix by platform

### Flutter

1. `void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); runApp(const MyApp()); }`

## How to diagnose

1. **Init** — Awaited before use?
2. **Config** — Platform files present?
3. **Isolate** — Background handler?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/flutter/firebase-no-app-default)
