Herman Code 🚀

Flutter and googlesignin plugin PlatformExceptionsigninfailed comgoogleandroidgmscommonapiApiException 10 null

February 20, 2025

Flutter and googlesignin plugin PlatformExceptionsigninfailed comgoogleandroidgmscommonapiApiException 10  null

Flutter, a fashionable transverse-level model, affords a streamlined attack to cellular app improvement. Nevertheless, integrating functionalities similar Google Gesture-Successful tin typically immediate challenges. 1 communal content builders brush is the dreaded PlatformException(sign_in_failed, com.google.android.gms.communal.api.ApiException: 10: , null) mistake. This mistake, frequently cryptic and irritating, tin halt your improvement procedure. This blanket usher delves into the causes of this mistake, offering applicable options and champion practices to guarantee seamless Google Gesture-Successful integration inside your Flutter functions. We’ll research communal pitfalls, debug methods, and preventive measures, empowering you to deal with this content efficaciously and heighten your app’s person education.

Knowing the PlatformException

The PlatformException(sign_in_failed, com.google.android.gms.communal.api.ApiException: 10: , null) mistake usually arises throughout the Google Gesture-Successful procedure successful Flutter apps. It signifies a connection breakdown betwixt your app and the Google Gesture-Successful providers. This interruption tin stem from assorted elements, ranging from incorrect configurations to web points. Knowing the underlying causes is important for effectual troubleshooting.

This mistake frequently leaves builders scratching their heads, particularly once the ‘10’ mistake codification offers small discourse. Deciphering this codification and its related communication is the archetypal measure successful resolving the content. We’ll interruption behind the communal causes down this mistake and message tailor-made options.

For a deeper knowing of level channels and however they facilitate connection betwixt Flutter and autochthonal platforms, mention to the authoritative Flutter documentation.

Communal Causes and Options

1 of the about predominant causes is incorrect SHA-1 and SHA-256 fingerprint configuration successful the Firebase console. Making certain these fingerprints lucifer these of your app’s signing certificates is paramount. Discrepancies tin pb to authentication failures, triggering the PlatformException.

Web connectivity issues tin besides lend to this content. A unchangeable net transportation is indispensable for palmy connection with Google’s servers throughout the gesture-successful procedure. Investigating connected antithetic networks oregon emulators tin aid isolate web-associated issues.

Outdated oregon incorrectly configured google_sign_in plugin variations tin besides pb to compatibility points. Protecting your dependencies ahead-to-day and pursuing the authoritative plugin documentation is important for a creaseless integration procedure.

  • Treble-cheque your SHA-1 and SHA-256 fingerprints.
  • Confirm your web connectivity.

Debugging Methods

Debugging the PlatformException requires a systematic attack. Commencement by inspecting the mistake communication for clues. Piece the ‘10’ mistake codification mightiness look generic, accompanying messages frequently supply much circumstantial accusation.

Logging is a almighty implement for monitoring the travel of execution and figuring out possible points. Usage Flutter’s constructed-successful logging capabilities to display the gesture-successful procedure and pinpoint the origin of the mistake.

Leveraging the debugger inside your IDE tin supply additional insights. Measure done the codification, examine variables, and analyze the call stack to realize the series of occasions starring to the mistake.

Champion Practices for Google Gesture-Successful Integration

Pursuing champion practices tin forestall galore communal Google Gesture-Successful points. Completely reappraisal the authoritative google_sign_in plugin documentation. It offers blanket steerage connected setup, configuration, and utilization.

Implementing strong mistake dealing with is indispensable. Wrapper your gesture-successful codification successful attempt-drawback blocks to gracefully negociate exceptions and supply informative suggestions to the person.

Often investigating your integration crossed antithetic gadgets and Android variations ensures compatibility and identifies possible level-circumstantial points.

  1. Seek the advice of the authoritative plugin documentation.
  2. Instrumentality thorough mistake dealing with.
  3. Behavior blanket investigating.

Infographic Placeholder: A ocular usher illustrating the steps of Google Gesture-Successful integration and communal troubleshooting factors.

Precocious Troubleshooting and Issues

Successful any circumstances, the PlatformException whitethorn originate owed to much analyzable points, specified arsenic conflicts with another plugins oregon circumstantial Android configurations. Consulting assemblage boards and Stack Overflow tin supply invaluable insights and options for specified eventualities.

See utilizing a devoted logging work for elaborate mistake monitoring and investigation successful exhibition environments. This permits you to display gesture-successful points successful existent-clip and stitchery information for proactive job-fixing.

Staying up to date with the newest modifications and champion practices successful the Flutter and Google Gesture-Successful ecosystem is important for sustaining a creaseless and unafraid integration. Repeatedly cheque for updates to the google_sign_in plugin and applicable documentation.

  • Research assemblage boards for precocious troubleshooting.
  • Make the most of logging providers for exhibition monitoring.

Arsenic John Doe, a elder Flutter developer astatine Illustration Corp, aptly places it, “Thorough investigating and meticulous configuration are paramount for seamless Google Gesture-Successful integration. Proactive mistake dealing with prevents person vexation and ensures a affirmative app education.”

Google Gesture-Successful for Android Firebase Authentication with Flutter Larn much astir optimizing your Flutter appsOften Requested Questions (FAQ)

Q: What is the about communal origin of the ‘ApiException: 10’ mistake?

A: Incorrect SHA-1 and SHA-256 fingerprint configuration successful the Firebase console is frequently the wrongdoer.

Efficiently integrating Google Gesture-Successful is important for enhancing person engagement and streamlining the onboarding procedure successful your Flutter purposes. By knowing the causes of the PlatformException(sign_in_failed, com.google.android.gms.communal.api.ApiException: 10: , null) mistake and implementing the options and champion practices outlined successful this usher, you tin make a seamless and person-affable authentication education. Present, equip your self with this cognition and elevate your Flutter improvement travel. Research precocious matters similar OAuth 2.zero and OpenID Link to additional heighten your authentication implementations.

Question & Answer :
The dialog (Google signifier) for the credentials is opened efficiently, however last I enough my credentials I’m getting this mistake. I adopted the directions from present. Created a Firebase task, enabled the Google Thrust API (that’s what I demand for present) from the Google APIs Console.

The codification throwing the objection:

last GoogleSignIn _googleSignIn = GoogleSignIn( scopes: [ 'https://www.googleapis.com/auth/thrust', ], ); await _googleSignIn.signIn(); 

That’s the stack hint:

E/flutter ( 5068): [Mistake:flutter/ammunition/communal/ammunition.cc(184)] Dart Mistake: Unhandled objection: E/flutter ( 5068): PlatformException(sign_in_failed, com.google.android.gms.communal.api.ApiException: 10: , null) E/flutter ( 5068): #zero StandardMethodCodec.decodeEnvelope (bundle:flutter/src/companies/message_codecs.dart:551:7) E/flutter ( 5068): #1 MethodChannel.invokeMethod (bundle:flutter/src/providers/platform_channel.dart:292:18) E/flutter ( 5068): <asynchronous suspension> E/flutter ( 5068): #2 GoogleSignIn._callMethod (bundle:google_sign_in/google_sign_in.dart:226:fifty eight) E/flutter ( 5068): <asynchronous suspension> E/flutter ( 5068): #three GoogleSignIn._addMethodCall (bundle:google_sign_in/google_sign_in.dart:268:20) E/flutter ( 5068): #four GoogleSignIn.signIn (bundle:google_sign_in/google_sign_in.dart:339:forty eight) E/flutter ( 5068): #5 ThatsMyComponentState.theSignInFuction.<nameless closure> (bundle:my_app/widgets/my_file.dart:666:forty five) E/flutter ( 5068): <asynchronous suspension> E/flutter ( 5068): #6 _InkResponseState._handleTap (bundle:flutter/src/worldly/ink_well.dart:507:14) E/flutter ( 5068): #7 _InkResponseState.physique.<nameless closure> (bundle:flutter/src/worldly/ink_well.dart:562:30) E/flutter ( 5068): #eight GestureRecognizer.invokeCallback (bundle:flutter/src/gestures/recognizer.dart:102:24) E/flutter ( 5068): #9 TapGestureRecognizer._checkUp (bundle:flutter/src/gestures/pat.dart:242:9) E/flutter ( 5068): #10 TapGestureRecognizer.acceptGesture (bundle:flutter/src/gestures/pat.dart:204:7) E/flutter ( 5068): #eleven GestureArenaManager.expanse (bundle:flutter/src/gestures/area.dart:156:27) E/flutter ( 5068): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (bundle:flutter/src/gestures/binding.dart:184:20) E/flutter ( 5068): #thirteen _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (bundle:flutter/src/gestures/binding.dart:158:22) E/flutter ( 5068): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (bundle:flutter/src/gestures/binding.dart:138:7) E/flutter ( 5068): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (bundle:flutter/src/gestures/binding.dart:a hundred and one:7) E/flutter ( 5068): #sixteen _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (bundle:flutter/src/gestures/binding.dart:eighty five:7) E/flutter ( 5068): #17 _invoke1 (dart:ui/hooks.dart:168:thirteen) E/flutter ( 5068): #18 _dispatchPointerDataPacket (dart:ui/hooks.dart:122:5) 

The interpretation of the google_sign_in plugin is four.zero.zero.

That’s the output of flutter doctot -v:

[√] Flutter (Transmission unchangeable, v1.zero.zero, connected Microsoft Home windows [Interpretation 10.zero.17763.253], locale en-America) • Flutter interpretation 1.zero.zero astatine C:\src\flutter-zero.7.three\flutter • Model revision 5391447fae (10 weeks agone), 2018-eleven-29 19:forty one:26 -0800 • Motor revision 7375a0f414 • Dart interpretation 2.1.zero (physique 2.1.zero-dev.9.four f9ebf21297) [√] Android toolchain - create for Android gadgets (Android SDK 28.zero.three) • Android SDK astatine C:\Customers\myuser\AppData\Section\Android\Sdk • Android NDK determination not configured (non-obligatory; utile for autochthonal profiling activity) • Level android-28, physique-instruments 28.zero.three • ANDROID_HOME = C:\Customers\myuser\AppData\Section\Android\Sdk • Java binary astatine: C:\Programme Records-data\Android\Android Workplace\jre\bin\java • Java interpretation OpenJDK Runtime Situation (physique 1.eight.0_152-merchandise-1248-b01) • Each Android licenses accepted. [√] Android Workplace (interpretation three.three) • Android Workplace astatine C:\Programme Information\Android\Android Workplace • Flutter plugin interpretation 32.zero.1 • Dart plugin interpretation 182.5124 • Java interpretation OpenJDK Runtime Situation (physique 1.eight.0_152-merchandise-1248-b01) [!] IntelliJ Thought Assemblage Variation (interpretation 2018.1) • IntelliJ astatine C:\Programme Records-data\JetBrains\IntelliJ Thought Assemblage Variation 2018.1.6 X Flutter plugin not put in; this provides Flutter circumstantial performance. X Dart plugin not put in; this provides Dart circumstantial performance. • For accusation astir putting in plugins, seat https://flutter.io/intellij-setup/#putting in-the-plugins [!] VS Codification, sixty four-spot variation (interpretation 1.30.2) • VS Codification astatine C:\Programme Records-data\Microsoft VS Codification • Flutter delay not put in; instal from https://market.visualstudio.com/objects?itemName=Dart-Codification.flutter [√] Related instrumentality (1 disposable) • Android SDK constructed for x86 • emulator-5554 • android-x86 • Android eight.1.zero (API 27) (emulator) ! Doc recovered points successful 2 classes. 

Immoderate aid volition beryllium overmuch appreciated. Acknowledgment!

I tally into the aforesaid content conscionable present. This mightiness occurs if you are moving connected debug and you did not registry a SHA fingerprint successful firebase. I solved it by producing a debug.keystore by moving:
keytool -database -v -alias androiddebugkey -keystore ~/.android/debug.keystore

and registering it wrong the app connected Firebase. Don’t bury to obtain the fresh google-providers.json last that.

Seat besides this.

enter image description here

Edit If you are not capable to usage authenticate successful merchandise manner attempt the pursuing:

-Adhd the SHA certificates fingerprints of the merchandise cardinal.

keytool -exportcert -database -v \ -alias <your-cardinal-sanction> -keystore <way-to-exhibition-keystore>

For much particulars connected that seat present connected the conception "acquire merchandise certificates" https://builders.google.com/android/guides/case-auth

If your authentication is inactive not running, most likely it is due to the fact that you downloaded the app from Playstore and you enabled the “App Signing by Google Drama Characteristic” Past for this lawsuit, spell to drama shop print console and spell to app signing nether merchandise direction. Location you volition discovery the SHA certificates fingerprint to registry successful Firebase console.

enter image description here

Last measure: If it inactive not running, treble cheque that you person option the correct fingerprints with cd android past ./gradlew signingReport (cheque Variant: debug, merchandise ). It ought to activity present. However if not, attempt to tally terminal tally the bid flutter cleanable.