PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10:, null, null) При попытке использовAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10:, null, null) При попытке использов

Сообщение Anonymous »


I have read all the Stackoverflow questions and github issues I can find but nothing worked.

I am trying to sign in and authenticate Calender scopes using GoogleSignIn.

I have -
  • used the gradle task in Android Studio to get my SHA-1 and SHA256 fingerprints.
  • added the SHA-1 to my OAuth2 credentials in Google cloud console.
  • added BOTH SHA-1 and SHA256 keys to my firebase console
  • replaced the google-services.json file after doing so.
  • added classpath 'com.google.gms:google-services:4.3.10' to my project's build.gradle file, and apply plugin: 'com.google.gms.google-services' inside my app's build.gradle file.
  • ran flutter clean after all of this.

I checked it both in debug and release mode, both on a phone and an emulator.

does anyone have any idea what am I missing?

This is my code:

this is in initState():

_signIn.onCurrentUserChanged.listen((user) async { if(user != null) { d.log('${user.id}, ${user.email}, ${user.photoUrl}'); final authUser = (await _signIn.authenticatedClient()); if(authUser == null) { d.log('no user'); } else { _calendar = CalendarApi(authUser); } } }); and this is when I press the login button:

void _onPress() { if(_calendar == null) { _signIn.signIn(); } else { ... }); } } This is my flutter doctor -v:

[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.19041.572], locale en-IL) • Flutter version 2.10.3 at D:\flutter\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 7e9793dee1 (11 days ago), 2022-03-02 11:23:12 -0600 • Engine revision bd539267b4 • Dart version 2.16.1 • DevTools version 2.9.2 [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at C:\Users\Itay Rabin\AppData\Local\Android\sdk • Platform android-32, build-tools 32.1.0-rc1 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [√] Android Studio (version 2021.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822) [√] IntelliJ IDEA Community Edition (version 2020.3) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.2 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart [√] Connected device (3 available) • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19041.572] • Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.51 [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category. This is the error I get:
E/flutter ( 4782): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null) E/flutter ( 4782): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7) E/flutter ( 4782): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:177:18) E/flutter ( 4782): E/flutter ( 4782): #2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:377:43) E/flutter ( 4782): E/flutter ( 4782): #3 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:248:30) E/flutter ( 4782): E/flutter ( 4782): #4 GoogleSignIn.signIn.isCanceled (package:google_sign_in/google_sign_in.dart:378:5) E/flutter ( 4782): E/flutter ( 4782):

Источник: https://stackoverflow.com/questions/714 ... iexception
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • PlatformException (sign_in_failed com.google.android.gms.common.api.apiexception 10 null null)
    Anonymous » » в форуме Android
    0 Ответы
    2 Просмотры
    Последнее сообщение Anonymous
  • PlatformException (sign_in_failed com.google.android.gms.common.api.apiexception 10 null null)
    Anonymous » » в форуме Android
    0 Ответы
    2 Просмотры
    Последнее сообщение Anonymous
  • Необработанное исключение: PlatformException (sign_in_failed, com.google.android.gms.common.api.ApiException: 10:, null,
    Anonymous » » в форуме JAVA
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Необработанное исключение: PlatformException (sign_in_failed, com.google.android.gms.common.api.ApiException: 10:, null,
    Anonymous » » в форуме Android
    0 Ответы
    17 Просмотры
    Последнее сообщение Anonymous
  • PlatformException (sign_in_failed, com.google.android.gms.common.api.b: 12500:, null, null)
    Anonymous » » в форуме Android
    0 Ответы
    13 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Android»