'Unable to perform google login in flutter
When I use google login it was working fine but now it's giving this error.
Google Login is working fine in another mobile
final googleUser = await GoogleSignIn().signIn();
// Obtain the auth details from the request
final googleAuth = await googleUser?.authentication;<=Error is on this line
V/ImeFocusController( 7777): onWindowFocus: DecorView@a62a7e[MainActivity] softInputMode=STATE_UNSPECIFIED|ADJUST_RESIZE|IS_FORWARD_NAVIGATION
V/ImeFocusController( 7777): Restarting due to isRestartOnNextWindowFocus as true
D/ImeFocusController( 7777): onViewFocusChanged, view=DecorView@a62a7e[MainActivity], mServedView=DecorView@a62a7e[MainActivity]
V/ImeFocusController( 7777): checkFocus: view=DecorView@a62a7e[MainActivity] next=DecorView@a62a7e[MainActivity] force=true package=com.mechsoft.contact_mngmt
E/flutter ( 7777): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(exception, BAD_REQUEST, null, null)
E/flutter ( 7777): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter ( 7777): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18)
E/flutter ( 7777): <asynchronous suspension>
E/flutter ( 7777): #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:377:43)
E/flutter ( 7777): <asynchronous suspension>
E/flutter ( 7777): #3 GoogleSignInAccount.authentication (package:google_sign_in/google_sign_in.dart:97:9)
E/flutter ( 7777): <asynchronous suspension>
E/flutter ( 7777): #4 _LoginOptionState._signInWithGoogle (package:contact_mngmt/views/auth/login_option.dart:139:26)
E/flutter ( 7777): <asynchronous suspension>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
