flutter firebase MissingPluginException
1,778
If anyone else had the same issue as me
I've fixed the issue by creating another project and added the sh1 and sh256 to firebase just follow this tuto it's really helpful https://www.youtube.com/watch?v=CpyALC8Zpxo
PS: when u add firebase to your flutter project don't run it on chrome debug you will get an error, run it on your emulator or smartphone
happy coding ^^
Author by
Wassef Hassine
Updated on December 31, 2022Comments
-
Wassef Hassine over 1 year
I just added firebase to my flutter App, i followed all the steps correctly, but i'm getting an error when initializing the app
this is my code to initialize app
void main() async { WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, theme: new ThemeData( canvasColor: Colors.white, ), home: PersistentTabsDemo(), onGenerateRoute: route.controller, ); } }
this are the dependecies i added to pubsec.yaml
firebase_core: ^1.6.0 firebase_analytics: ^8.3.1 firebase_auth: ^3.1.0 cloud_firestore: ^2.5.1
and this is the error
Error: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)
Edit: i tried removing async and await from my main class now i'm getting new error
No firebase App 'default' has been created - call Firebase.intializeApp()
-
Hasib Akon over 2 yearsRestart android studio . Check sh1 key is added to firebase setting.And did you added json file to android /app directory.
-
Wassef Hassine over 2 yearsyes i've already done all of that
-
Peter Obiechina over 2 yearsAre you running the app on windows?
-
-
Wassef Hassine over 2 years@Kanak Joshi yes i'am runing it on windows
-
tazboy about 2 yearsRight, but that's the problem. It's not working on Chrome. Any success on getting it to work on Chrome yet?