Необработанное исключение: PlatformException (исключение, неизвестно, null) - PullRequest
1 голос
/ 09 мая 2020

Получение указанной выше ошибки при аутентификации Google после того, как я успешно смогу выполнить вход в Google signIn () во флаттере. Вот фрагмент кода

final GoogleSignInAccount googleUser = await googleSignIn.signIn();
final GoogleSignInAuthentication googleAuth = await googleUser.authentication; // error in this line

final AuthCredential credential = GoogleAuthProvider.getCredential(
  accessToken: googleAuth.accessToken,
  idToken: googleAuth.idToken,
);

await auth.signInWithCredential(credential);

А далее - stacktrace

E/flutter (16539): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (16539): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter (16539): <asynchronous suspension>
E/flutter (16539): #2      MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48)
E/flutter (16539): #3      MethodChannelGoogleSignIn.getTokens (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:53:10)
E/flutter (16539): #4      GoogleSignInAccount.authentication (package:google_sign_in/google_sign_in.dart:87:45)
E/flutter (16539): #5      _silentLogin (package:Fluttergram/main.dart:74:10)
E/flutter (16539): <asynchronous suspension>
E/flutter (16539): #6      _HomePageState.silentLogin (package:Fluttergram/main.dart:317:11)
E/flutter (16539): #7      _HomePageState.build (package:Fluttergram/main.dart:234:7)
E/flutter (16539): #8      StatefulElement.build (package:flutter/src/widgets/framework.dart:4334:27)
E/flutter (16539): #9      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4223:15)
E/flutter (16539): #10     Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
E/flutter (16539): #11     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
E/flutter (16539): #12     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
E/flutter (16539): #13     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
E/flutter (16539): #14     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #15     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #16     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
E/flutter (16539): #17     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #18     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #19     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
E/flutter (16539): #20     Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
E/flutter (16539): #21     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
E/flutter (16539): #22     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
E/flutter (16539): #23     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #24     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #25     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
E/flutter (16539): #26     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #27     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #28     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
E/flutter (16539): #29     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #30     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #31     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:16)
E/flutter (16539): #32     Element.rebuild (package:flutter/src/widgets/framework.dart:3947:5)
E/flutter (16539): #33     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4206:5)
E/flutter (16539): #34     StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4381:11)
E/flutter (16539): #35     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
E/flutter (16539): #36     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #37     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #38     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
E/flutter (16539): #39     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #40     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #41     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5445:14)
E/flutter (16539): #42     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
E/flutter (16539): #43     Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
E/flutter (16539): #44     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4243:1
...