ERROR flutter lib ui ui dart state cc 157 Unhandled Exception core no-app No Firebase App DEFAULT has been created - call Firebase initializeApp

0 votes

Hi Guys,

I am trying to connect to the firebase in GCP from my Flutter App. But it is showing me the below error.

E/flutter ( 7544): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
Sep 3, 2020 in Others by akhtar
• 38,230 points
5,384 views

2 answers to this question.

0 votes

Hi@akhtar,

After installing the package in your Flutter app, you need to initialize Firebase in your main function. You are probably invoking firebase before the app is initialized. All calls to firebase must come after .initializeApp(). So in your main function initialize first as shown below.

firebase.initializeApp();
var db = firebase.firestore();
answered Sep 3, 2020 by MD
• 95,360 points
0 votes
answered Nov 21, 2020 by Milan
• 140 points

Related Questions In Others

0 votes
1 answer

TCPDF ERROR: Some data has already been output, can't send PDF file

To answer your question, do add the ...READ MORE

answered Feb 16 in Others by Aditya
• 7,660 points
104 views
0 votes
1 answer
0 votes
2 answers

Excel VBA App stops spontaneously with message "Code execution has been halted"

Solution Press the "Debug" button in the popup. Press Ctrl+Pause|Break twice. Hit ...READ MORE

answered 1 day ago in Others by narikkadan
• 19,680 points
13 views
0 votes
1 answer

flutter run: No connected devices

Hi@akhtar, To prepare to run and test your ...READ MORE

answered Jul 21, 2020 in Others by MD
• 95,360 points
2,730 views
0 votes
1 answer

What is the future of flutter?

Hi@MD, Flutter is a rather new cross-platform framework ...READ MORE

answered Jul 17, 2020 in Others by akhtar
• 38,230 points
413 views
0 votes
1 answer

What is Flutter?

Hi@akhtar, Flutter is an app SDK for building ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,360 points
556 views
0 votes
1 answer

How to install Flutter in Windows system?

Hi@akhtar, You can follow the below-given steps to ...READ MORE

answered Jul 17, 2020 in Others by MD
• 95,360 points
944 views
0 votes
1 answer

Error: No pubspec.yaml file found.

Hi@akhtar, You need to run this command from ...READ MORE

answered Jul 20, 2020 in Others by MD
• 95,360 points
6,675 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP