I am trying to upload my app to the huawei's app gallery but every time I upload it for a review they send a vid where the map inside the app is not loading, At first i thought the issue was that they might be testing it using a device that doesn't have GMS but even after that, the map is not loading
what I tried so far
-I added the signing-certificate fingerprint to the google cloud
but i then remembered that Huawei makes you sign the app with another signing certificate which is SHA-256 and the google console can only take SHA-1 how can i fix this issue
The issue was as expected since Huawei uses the app signing certificate that they created, it wouldn't load the map because google can't take SHA-256, so to fix the issue you should use APK instead of AAB to be able to use your app signing certificate to let the app be able to communicate with the API.
that means you can only use AAB when the app uses HMS instead of GMS
First you are advised to use Huawei map kit on huawei phones.
With respect to your second question, you could use the following command to to obtain SHA1 and SHA256 of the same key:
keytool -list -v -keystore android.jks
Related
I have added "com.google.android.gms:play-services-auth:20.1.0" in my application. We are using Firebase App distribution for sharing app internally for testing. The app auto sms fetch functionality works fine when we create and APK and upload to FirebaseAppDistribution but when we upload AppBundle .aab than it never works. If i download the aab file from FirebaseAppDistribution and install it using bundletool.jar the SMS auto fetch functionality works. Initially it was showing a message something like this is signed with test certificate. Please add key to 3rd party services. I forgot to copy those keys and that message disappeared now and i cant find any certificate keys in firebase. what could be the reason or How can i fix it ? any help plz.
Summary of our problem:
We released last week our app bundle in the Huawei AppGallery.
We used the Huawei Map Kit in order to integrate Maps. However, there seems to be a problem with map kit.
We receive the error messages:
V/HmsMapKit_MapDataVersionClient_15: build request with apiKey
D/HmsMapKit_AuthenticateClient_86: response code : 401
E/HmsMapKit_TileCache_38: startUrlRequest Identity fail, do not has permission get tile. authResult :010002
What we have done so far:
Enable mapkit in AppGallery connect
Add sha256 fingerprints of the signed bundle to the app in AppGallery conncet
Build the app with agconnect-services.json
Initializing mapkit with the api key setup on the huawei developer page
Encode the API key as below: URLEncoder.encode("", "utf-8")
Tested the rc before uploading where it worked perfectly fine
As we are having troubles in identifying the cause for our problem, it would be very helpful to get further advice.
Thank you very much in advance.
Seems to be you are.using signing by AppGallery.
If so, you have to add one more SHA-256 to project settings, which you can get from application singing settings in console
According to this Docs,It's most likely caused by the following:
When localy building apk works but store submitted apk does not work, it is most likely the signing issue.
And for App bundle signing, there are 2 ways.
AppGallery Connect generates a new signature key for your new app
App Signing allows you to upload your own signature key
NOTE
Once a signature key is generated in AppGallery Connect or uploaded by you, it cannot be modified.
so depends on the approach, you might already have a signature key that is fixed already.
and it seems in this case you have your own signature key.
when we need to use upload key to sign apk before submit to AppGallery, do not use signature key to sign for upload apk, in this case, also upload key certificate and upload key to AppGallery.
need to make sure signature key certificate and upload key certificate are correct if used.
Im writing a flutter mobile app that requires the use of firebases authentication product which in turn requires the use of sha1. I am on a small team and to get each instance of the app to work on each persons computer we needed to register a new sha1 address per computer, this is fine for debugging purposes but obviously cant be done in production. How do you get a consistent sha1 across all the app instances so that each new user does not have to register a unique sha1?
When you generate release APK, you will be creating a key in Keystore (a private file), from which you would extract out your release SHA1 key. This would be the consistent SHA1 key for all the users downloading the app.
You just need to add this release SHA1 key in your Firebase console.
Kindly refer here for more details about building an android application in flutter: Build and release an Android app
Happy Coding :-)
On production, you will get a signing key from Google Play and you will add that to firebase and it will generate a new google-services.json file for you. you will be fine on production.
If you are releasing the app to the stores then you have to generate a key store as described here then you need to add this SHA-1 finger print in the firebase console.
To view the SHA1-1 finger print of the above generated key store then execute below command
keytool -list -v -keystore {keystore_name} -alias {alias_name}
You can see the SHA-1 finger print in the terminal and add the same in firebase console
I created and upload an app with google sign-in to google play, it works in debug mode and in release mode
I had to follow:
Generate SHA-1 for Flutter app
and Google sign in failed com.google.android.gms.common.api.ApiException: 10:
Which says that I need to Link Google Play to Firebase https://support.google.com/firebase/answer/6392038?hl=en
But I get the following error:
Any idea how to solve this?
My app is in production but the login fails.
My solution was:
Login to Firebase console
remove your android app
add it again
follow Generate SHA-1 for Flutter app to get your release sha-1 and add it to your app in Firebase console Google sign in failed com.google.android.gms.common.api.ApiException: 10:
remarks:
I believe the actual value of the sha-1 key didn't changed
I didn't add my debug SHA1, only release
I believe simply deleting the debug SHA1 or deleting both and re-entering only the release SHA1 would have also solved the problem, but I didn't test it
I still get the Linking to Google Play: An error occurred while trying to link but I doens't matter as long as the signing works
I guess (didnt check yet) that now my app will fail on google singin indebugmode, but I will deal with it later - I hope that simply adding thedebug` key again will work
extra info (from firebase support)
Here we have two issues: Linking play console to Firebase console, and the issue with the google-sign-in on production.
For the linking problem, note that in order to link or unlink your Play Console account to a Firebase project, you need to use the same Google account on the Play Console and Firebase console. You may also check this https://support.google.com/googleplay/android-developer/answer/6110967?hl=en for more details, if the accounts are the correct try to enable Google Analytics first which then it will allow you to link your Google Play account.
For the second issue, you could have configured the debug and release SHA-1 keys. However, you need a third key hash, when you enroll for Google Play App Signing https://medium.com/mindorks/securing-and-optimizing-your-app-with-google-play-app-signing-24a3658fd319 in play console, you basically ask google to sign your app on your behalf, in order to obtain the key you must add the app signing certificate from the Play console, and add the SHA-1 key in the Firebase console. I really encourage you to read this blog entry https://medium.com/#akashmahali/facebook-login-google-sign-in-not-working-on-android-app-in-production-5febd9537f92, there the author explains more about this error, and how to fix it.
If you have any questions, feel free to write back !
Firebase Auth Ui Google Sign In Code:10, message:10:
I use firebase auth-ui to sign in with google,
it toasted
Code:10, message:10:
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
Google this days are making simple things complicated.
The problem is the third key,
1- The debug key
2- The release key
3- Google Play App signing key
You need THREE keys to figure out ONE Google SignIn.
Does facebook also need three keys?
Maybe one day google will need 30 keys.
To have a smooth sign in with Google across build variants (Debug, Release, and Store):
Go to Firebase admin console and open the project settings
Scroll down to "Your apps" section
Add 3 SHA-1 Values. (the one from your debug key, the one from your release key and the one from Google play singing tab)
For debugging and release keys, you can use the keytool to generate the SHA-1 value as in the docs.
EDIT
Tp reach the "App Signing" in the new Google Play console:
From Left side bar open Setup section
App Integrity
Then App Signing Key Certificate
For Google signing SHA-1 key, Go to Google play console, Open "Release Management" section and click on "App Signing" sidebar menu item. You will find the SHA-1 fingerprint value there under "App signing certificate"
These tips have worked for me :
1 - Verify your SHA-1 key is still corresponding between your app and firebase : you can generate this SHA key as #Yuliiia mentionned with the command line but you can also do it directly from you android studio project. Click on "Gradle" tab (on the right of the IDE) then drop-down android folder and double-click on "signingReport".
2 - Go to your firebase console, download a new version of the google-services.json file and replace the former one by it.
3 - Last trick : delete the account (e.g: testemail#gmail.com) you're trying to connect with from the firebase authentication console.
Note 1: For each solution above I suggest to uninstall the app from your emulator or mobile.
Note 2: Error code from firebase is not only code:10, it could throw code: 8, code: 16, etc.
Hope it helps !
Have you added your SHA certificate fingerprint code to your Firebase project? If no, do it. Official instruction to get SHA certificate fingerprint.
To get the release certificate fingerprint (Linux/Mac OS):
keytool -exportcert -list -v \
-alias <your-key-name> -keystore <path-to-production-keystore>
To get the debug certificate fingerprint (Linux/Mac OS):
keytool -exportcert -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore
The keytool utility prompts you to enter a password for the keystore. The default password for the debug keystore is android. The keytool then prints the fingerprint to the terminal. For example:
Certificate fingerprint: SHA1: DA:39:A3:EE:5E:6B:4B:0D:82:59:BF:EF:09:68:90:70:AF:D5:07:01
I had the same issue, when I was using the downloaded version on google-services.json, but worked when used Tools->FireBase and connected to database and di the sync.
I also came across this issue several times. In my last case it was that I was trying to build app without using signing configurations. So to let android studio know about my signing configuration I had to edit ProjectRootFolder\app\build.gradle to add following configuration.
android {
signingConfigs {
debug {
storeFile file("your path to keystore file")
storePassword "keystorepass123"
keyAlias "youralias"
keyPassword "yourkeypass"
}
}
...
But it is not good for version control to hard code the values. Better to move variables to separate file. It is a common practice to move the values to gradle properties file. See below
Even though the official documentation very good, as there are multiple processes on the workflow to achieve the end result, to make it more understandable I created a tutorial video showing the complete process. Error code 10 and fix is at timestamp 24:43. See description to find out the timestamps of keystore generation,listing SHA1, signingconfigs setting and moving to gradle properties file. Hope this might help someone looking for the solution in future.
I had this issue and the cause was that Google was handling my Signing Key, and I was trying to add the SHA1 certificate from my upload key. Once I went to Google Play console to found the SHA1 certificate from the app signing key and uploaded that, I no longer received the error.
look sometimes, the Google server ID and the client ID provided by Oauth has make confusion , let me clear all , replace the new clientID with the old clientID in the google.json file , and don't edit anything more , and also put the server ID same , and then uninstall the app and rebuilt and then run the app ,,
Hopefully it will work ..