exception occurs while Integrating FireBase Authentication Process

286 views
Skip to first unread message

Anbarasu Theresnathan

unread,
Mar 21, 2019, 7:04:23 AM3/21/19
to Flutter Dev

Hi ,

I tried to do firebase Authentication , I activated the auth method email in firebase and also imported the google services json.

Followed the tutorial
https://github.com/RobertBrunhage/Youtube-Tutorials/tree/master/firebase_showcase
but i am getting the below error

E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.handleSignInWithCredential(FirebaseAuthPlugin.java:429)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at io.flutter.plugins.firebaseauth.FirebaseAuthPlugin.onMethodCall(FirebaseAuthPlugin.java:108)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:202)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at android.app.ActivityThread.main(ActivityThread.java:6718)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/MethodChannel#plugins.flutter.io/firebase_auth(11436): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/flutter (11436): Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.firebase.auth.FirebaseAuth.signInWithCredential(com.google.firebase.auth.AuthCredential)' on a null object reference
W/IInputConnectionWrapper(11436): getTextBeforeCursor on inactive InputConnection
W/IInputConnectionWrapper(11436): getSelectedText on inactive InputConnection
W/IInputConnectionWrapper(11436): getTextAfterCursor on inactive InputConnection
E/FA      (11436): Task exception on worker thread: java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml does not exist.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />: com.google.android.gms.measurement.internal.zzgd.zzd(Unknown Source:601)
E/FA      (11436): Failed to load metadata: Metadata bundle is null
E/FA      (11436): Failed to load metadata: Metadata bundle is null  ```


Please find my dependencies in ```pubspec.yaml``` file, I added 
```google_sign_in: ^4.0.1+1
     firebase_auth: ^0.8.1+4```
and also I have done the below steps

```Project-level build.gradle (<project>/build.gradle):



buildscript {
  dependencies {
    // Add this line
    classpath 'com.google.gms:google-services:4.0.1'
  }
}
App-level build.gradle (<project>/<app-module>/build.gradle):


dependencies {
  // Add this line
  implementation 'com.google.firebase:firebase-core:16.0.1'
}
...
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

but no luck, Please help to fix this issue

PRAVIN MARATHE

unread,
Mar 22, 2019, 4:41:41 AM3/22/19
to Flutter Dev
Hi there,

It seems firebase_auth: ^0.8.1+4 plugin is still under the development.
Check if firebase_auth: 0.7.0 is feasible with your task.


Regards,
Pravin Marathe
Reply all
Reply to author
Forward
0 new messages