Implementing google login flutter gives 12500 error - flutter

I implemented google login in flutter without using firebase in flutter (google cloud console). It was working in apk then later I needed push notification service for which I used firebase (fcm token and all) then I released the app to playstore but google login does not work. I keep getting apiexception error. Has anybody faced this issue? if yes any help would be highly appreciated.

I do not have a specific answer to your problem but I have also faced this problem once, I accidentally resolved it though.
But Error 12500 is a general error code that may occur when attempting to use the Google Sign-In feature and is caused by a few potensial issues:
An issue with the SHA-1 fingerprint of your app's signing
certificate: To use Google Sign-In, you need to configure your app's
SHA-1 fingerprint and package name in the Firebase console. Make
sure that the fingerprint and package name you have configured in
the Firebase console match the ones you are using to sign your app.
An issue with the Google Services configuration file: Make sure you
have properly added the Google Services configuration file to your
app.
An issue with the Google Play Services library: Make sure you have
the latest version of the Google Play Services library installed in
your app.
An issue with the device or emulator you are using: Make sure you
are testing on a device or emulator that has Google Play Services
installed and is up to date.
Possible fixes to try/check:
Double-check the SHA-1 fingerprint and package name: Make sure that
the SHA-1 fingerprint and package name you have configured in the
Firebase console match the ones you are using to sign your app.
Make sure you have added the Google Services configuration file: The
Google Services configuration file is required for your app to
communicate with Google services, including Google Sign-In. Make
sure you have properly added this file to your app.
Update the Google Play Services library: Make sure you have the
latest version of the Google Play Services library installed in your
app. You can check for updates by going to the "SDK Manager" in
Android Studio.
Test on a device or emulator with Google Play Services installed:
Make sure you are testing on a device or emulator that has Google
Play Services installed and is up to date.
I hope this helps! I will quickly search if I can find any other solution.

Related

Is there anything wrong with Unity GPGS Production Setting?

Currently, my Unity Android app that I uploaded as a production on Google Play has a big problem.
We started Google As advertisement and checked the inflow of users (installation of 1,597),
However, there are only 67 users who have actually accessed it...
I downloaded my app that I uploaded to Google Play directly and logged in with my Google account, so there was no problem, and I asked my friend to download and run the app, so there was no problem logging in.
The predictable problem is that due to the number of concurrent users, many users are unable to access when starting the advertisement, or something seems to be wrong with my GPGS setting.
Please check the possible problems and the image of my GPGS setup.
**Setting **
Unity Ver : 2021.3.8f1
GPGS Plugin : 0.10.14
State
Upload Google Console Production
Google Console -> Play Games Services -> Setup And Management -> Configuration -> Publish Complete
Create 3 Google Cloud Platform OAuth Clients
-> Upload key, app signature key, server
1. Suspected Problem 1
If the AndroidManifest.xml Package Name is different from the package name of the Google Console, can the Production user not access it?
Unity -> PlaySetting -> Identification -> Package Name is entered as the package name of the Google Console, but AndroidManifest.xml Package Name is marked as package="com.google.example.games.mainlibproj" and modified it directly to the package name of the Google Console, but it was restored again.
enter image description here
enter image description here
(If it is a problem and you need to check the Unity error list, you can attach it later)
2. Suspected Problem 2
Can't the user access because Unity's keystore certificate is set to upload authentication signature, not app authentication signature?
enter image description here
3. If you have any other problems, please give us your opinion.

Flutter: SafetyNet Attestation fails basic integrity

When trying to run Firebase Phone Authentication through a Virtual Android Device am getting the following error messages;
E/zzbf ( 6464): SafetyNet Attestation fails basic integrity.
I/zzmt ( 6464): Provider GmsCore_OpenSSL not available
W/System ( 6464): Ignoring header X-Firebase-Locale because its value was null.
Android Device Verification for the project is enabled through
Google Cloud Console; https://i.imgur.com/e1XWrWS.png
SHA-1 & SHA-256 is added to Firebase Project Settings; https://i.imgur.com/0PLnkzm.png
App level build.gradle has implementation "androidx.browser:browser:1.4.0" & implementation 'com.google.android.gms:play-services-safetynet:18.0.1; https://i.imgur.com/RPHS4Y1.png
I have investigated similar StackOverflow topics and tried the possible solutions but no luck. Running on a physical Android Device it runs fine but in Virtual Device I can't get past captcha verification.
Also when checking the SafetyNet documentation I saw that it's deprecated and it will be replaced by Play Integrity API.
Google Play Integrity API is enabled through Google Cloud Console; https://i.imgur.com/WctB3i8.png
App level build.gradle has implementation 'com.google.firebase:firebase-appcheck-playintegrity'; https://i.imgur.com/qr1LiZ4.png
Nothing I have mentioned helped me fix the error messages, any suggestions ?
UPDATE 1::
Found this place and added Firebase App Check dependency to my app, but does it actually have anything to do with it as my issue is still going on?
You can try with this, might help,
Make sure to re-download the google-services.json whenever you change the SHA keys in the Firebase console.
Check if the android emulator (ADB) target supports Google Services

Do I need to make draft in google play console before I use Fastlane

Can you upload app in Fastlane command with android and Fastlane app in the google play console or I need to make draft in console before I do?
Fastlane unfortunately can not create an Android app from scratch, as it can with create_app_online (formerly known as produce) for iOS. Google just doesn't offer any API for that.
So yes, you have to at least create the app on the Google Play Console which usually includes uploading a first APK (so the Play Console knows about the package name [com.example.app] or your app) to one of the available lanes (which doesn't have to get published though).

MoPub GDPR SDK - how to test?

Hi I am setting up the MoPub GDPR Android SDK, am getting a call to the consent dialog page on the web but get this response :
05-16 11:10:46.469 13030-13152/ E/Volley: [18308] BasicNetwork.performRequest: Unexpected response code 400 for https://ads.mopub.com/m/gdpr_consent_dialog
This means "Bad Request" and that the call is corrupt I think. Has anyone got this call to work ?
This isn't an ideal solution, but it works.
On your test device install a VPN service app, there are lots of free ones available out there. If you're running in an emulator (or a device without Google Play) you can goto one of the many APK mirror sites to download and sideload the APK directly.
I won't get into the obvious risks of using VPNs, or sideloading apks outside of google play, but if you're paranoid just spin up an emulator to test this.
It's important the service offers VPN servers located in countries affected by GDPR.
Enable the VPN service on your device/emulator and make sure you're using a server located in a GDPR country (Germany, for example). Load up the app your testing, and it should now appear that you are accessing
Not sure why Pete is suggesting a VPN here. But it appears I was getting this error because I forgot to replace the AD_UNIT_ID in the SdkConfiguration.Builder with my Ad Unit ID.

Ionic and Firebase v3 google auth error

I'm trying to add the Google-plus login to my app, but no matter what I do I cannot get it working on a real Android device.
So far I was able to get the idToken from this plugin
cordova-plugin-googleplus
Using Firebase's singInWithCredential(idToken) I get an error that said:
This app, identified by the domain where it is hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.
I want to point out that I follow all the steps for the installation, SHA1 key are correct and I am using signed APKs.
Using the facebook plugin, retrieving the token and signInWithCredential worked without any issue.
Thanks in advance!
it seems like you have some API key restrictions that are not met by your ionic application.
To begin with, please check you are using the API key from the "Web setup" popup, under the auth section of the Firebase console for your project. This one should work out of the box if you have not changed your configuration in the API console.
If that doesn't fix the issue, go to the credentials section of the Google API console for your Firebase project, look for the API key that you are using, and check which referrer restrictions are set there and ensure they are met by your application. Read this answer for several options that you have to set up your API key restrictions for a Cordova app.
In my Ionic2 RC1 + Firebase3.5 + AngularFire2.beta5 project I had the same problem... Google Auth with Popup worked in Browser but not in my Android .APK
Note.- I didn't use Tokens in my App
Firstly, I add 192.168.1.172 to my Firebase Console authorized domain list and <allow-navigation href="http://192.168.1.172:8100"/> to my config.xml.
After this, I found that installing Cordova InAppBrowser plugin solves my problem definitively.
I didn't need to modify my code, only plug and play, exactly like David East says in his Social login with Ionic blog.