Google Sign-In in Flutter fails with PlatformException sign_in_failed, code 10
PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)Short answer
Code 10 means Google could not match your app to an OAuth client. In almost every case the SHA-1 of the key that signed this build is not registered for your package name. Register the debug, release and Play App Signing fingerprints, then check the package name and the web client ID.
Fix it fast
1Find out which cause you have
Print the SHA-1 of the key that actually signed the build you are running. Compare it with the fingerprints in your Firebase or Google Cloud project.
cd android ./gradlew signingReport2Match what you see, then jump to its fix
- 1
Sign-in works in one build type and fails in another, or never worked on this machineThe SHA-1 of the build you run is not registeredFix - 2
Sign-in works from a local build and fails on a build installed from PlayThe app comes from Google Play but only your upload key is registeredFix - 3
Fingerprint is registered but the error remains, or serverClientId must be provided on AndroidPackage name or web client ID does not matchFix
- 1
What does the error look like?
PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)GoogleSignInExceptionCode.clientConfigurationErrorserverClientId must be provided on Android
Cause 1 of 3
The SHA-1 of the build you run is not registered
1Check
Every signing key has its own SHA-1. The debug key lives in ~/.android/debug.keystore, so each developer machine has a different one.
keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore2Fix
Add the SHA-1 for the debug and the release key to your Android app in the Firebase console (Project settings, Your apps), then download google-services.json again and replace the old copy.
# android/app/google-services.json: replace with the freshly downloaded file
flutter clean
flutter run3Verify
The account chooser opens and returns a signed-in user.
flutter run --releaseConfirmed by developers.google.com
Cause 2 of 3
The app comes from Google Play but only your upload key is registered
1Check
With Play App Signing, Google re-signs the app with a different key than the one you upload. The SHA-1 of that app signing key is shown in the Play Console under Release, Setup, App integrity.
keytool -printcert -jarfile app-release.aab2Fix
Add the app signing certificate SHA-1 from the Play Console to the same Android app entry, in addition to your upload key.
# Firebase console > Project settings > Your apps > Add fingerprint3Verify
Install a build from an internal testing track and sign in.
# Play Console > Testing > Internal testingConfirmed by developers.google.com
Cause 3 of 3
Package name or web client ID does not match
1Check
The Android app in the console must use the same application ID as your build. If you do not use google-services.json, the plugin needs the client ID of a web application as serverClientId. A google-services.json without an oauth_client of type 3 also lacks it.
grep -n "applicationId\|namespace" android/app/build.gradle*
grep -n "client_type" android/app/google-services.json2Fix
Make the application ID and the console entry identical. Pass the web client ID, or enable Google Sign-In in Firebase and download google-services.json again so it holds the web client.
await GoogleSignIn.instance.initialize(
serverClientId: 'YOUR_WEB_CLIENT_ID.apps.googleusercontent.com',
);3Verify
Sign in again on a clean install.
flutter clean
flutter runConfirmed by pub.dev
How do I stop it coming back?
- Register debug, release and Play App Signing fingerprints on the day you create the project.
- Keep one shared debug keystore for the team, or have each developer add their own SHA-1.
- Re-download google-services.json after any change to the console entry.
- Test sign-in from an internal testing build before every public release.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
- WorkforceA field app, an admin console and a self-hosted Node.js server for push and reconciliation.
- Spotless LaundryAn on-demand laundry app: Flutter on a Laravel back end, with Firebase for live updates.
Related fixes
Mobile apps
Gradle cannot find com.google.firebase:firebase-analytics-ktx
Required by: project :app
Firebase moved the Kotlin extensions into the main modules and stopped releasing the -ktx modules in July 2025.
2 causes, each with a fixMobile apps
Flutter Android: Failed to load FirebaseOptions from resource
Failed to load FirebaseOptions from resource. Check that you have defined values.xml correctly.
On Android, Firebase reads its settings from a values.xml file that the Google services Gradle plugin builds from google-services.json.
4 causes, each with a fixMobile apps
Flutter phone sign-in fails with status 17028 and play_integrity_token
SMS verification code request failed: unknown status code: 17028 Invalid request fields in play_integrity_token
Firebase checks the app with Play Integrity before sending an SMS, and that check needs your SHA-256 fingerprint.
3 causes, each with a fixMobile apps
Flutter on Android: Missing google_app_id and Firebase Analytics disabled
Missing google_app_id. Firebase Analytics disabled.
The Firebase Android SDK reads your app ID from values the Google services Gradle plugin generates from google-services.json.
3 causes, each with a fixMobile apps
Google Play says the app does not support 16 KB memory pages
check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a
Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.
5 causes, each with a fixMobile apps
FirebaseInstanceIdService and FirebaseInstanceId.getToken() no longer work
Deprecation warning on FirebaseInstanceId.getInstance().getToken()
Move token handling into a class that extends FirebaseMessagingService and override onNewToken, which runs when a token is first created and whenever it changes.
2 causes, each with a fix