Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)

Using Flutter's google sign_in

But seeing the following message when I use this statement to sign in a user

_googleSignIn.signIn();

E/flutter ( 6491): MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)

I verified the following steps:

GoogleSignInPlugin.registerWith(registry.registrarFor("io.flutter.plugins.googlesignin.GoogleSignInPlugin")); // is present

GeneratedPluginRegistrant.registerWith(this); // in MainActivity.Java

Is this error frequently reported by users. Not sure how to proceed. I am doing what most of the docs say and yet it doesn't work.

Other weird behavior I see is, first time I run flutter run it gets stuck on await googleSignIn.SignIn().

Only after I do a hot reload (by typing "r"), I see the above error message of :

E/flutter (12326): MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)

Question: Are there any alternatives to do basic auth on Flutter applications. I just need some kind of basic auth so that my server can know which user it is serving data to.

like image 408
user462455 Avatar asked Jan 20 '18 19:01

user462455


1 Answers

I have been smashing my head over this problem when I encountered it. Finally I realized what I was doing wrong. I had to do the following steps
1>Switch to the master branch
flutter channel master
2>flutter upgrade
3>flutter clean
4>And the most important part, check if you have the facebook plugin. If yes, either set it up completely(not tested) or remove it(works) as it messes with the google plugin

like image 113
Siddharth Agrawal Avatar answered Oct 24 '22 14:10

Siddharth Agrawal