Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MissingPluginException exception when a firebase anonymous sign-in with flutter (windows) app

I recently started out with flutter for windows. I'm following this firebase and flutter tutorial. At lecture 4, I am getting error with Firebase Auth:

flutter: MissingPluginException(No implementation found for method signInAnonymously on channel plugins.flutter.io/firebase_auth)

I think the problem is because I am building for windows. I don't know how to add firebase to windows application. Any help is appreciated

Here is the complete log:

Launching lib\main.dart on Windows in debug mode...
Building Windows application...
Waiting for Windows to report its views...
Debug service listening on ws://127.0.0.1:60688/97Ok8iT1Hjo=/ws
Syncing files to device Windows...
flutter: MissingPluginException(No implementation found for method signInAnonymously on channel plugins.flutter.io/firebase_auth)
flutter: error signing in

EDIT 1

pubspec.yaml file (dependencies section)

dependencies:
  flutter:
    sdk: flutter
  firebase_auth: ^0.14.0+5
  cloud_firestore: ^0.12.9+4

EDIT 2

I updated the dependencies to use following versions:

  firebase_auth: ^0.18.1+2
  cloud_firestore: ^0.14.1+3
  firebase_core: ^0.5.0+1

But now I am getting the following error:

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method Firebase#initializeCore on channel plugins.flutter.io/firebase_core)

This is what my main function looks like:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  runApp(MyApp());
}
like image 564
Hardik Sachan Avatar asked Oct 12 '20 13:10

Hardik Sachan


1 Answers

Late to the party, but the actual issue is that flutter_core does not actually support Windows.
It only supports Android, iOS, MacOS & Web (See the firebase_core package on pub.dev).

enter image description here

like image 187
Sound Conception Avatar answered Oct 18 '22 17:10

Sound Conception