I'm building and app with Ionic.
I've followed this article about integrating my application with the native facebook sdk for a more pleasant experience of my users.
Unfortunately since today the facebook login gets stuck and keep responding with "Invalid key hash. The key hash XXX does not match any stored key hashes..."
I'm still running my app in development, I've never built it.
I've read all the possible articles about setting the key hash.
Tried:
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
which should be for development, but I noticed that the key in response from this command isn't the same form the error I reported above.
I think my application is stuck with a wrong hash key that gets from I don't know where... Because it should get the key from the debug.keystore in ./android .
Also I tried to create an entirely new application copying only the www folder, repeated the steps of configuration from the article above but nothing changed. Same error, same wrong key hash reported from the error.
Don't really know what the issue could be.
My facebook app is LIVE, I'm on mac.
I run my application on my android phone through ionic run android
Related
So I just built the new version of my app but when I upload the apk to the google play console I get this error
Image of Error
I have no idea what's causing it. I checked and within unity the key is the same one I used the first time I built the app. ID is same from the keystore. I have no idea what's causing this or how to fix it so i'd appreciate any help!
You must the same signing key used to sign the app bundle when it was initially uploaded to the Google Play Store. This signing key is typically stored in a Keystore file, which you can use to sign the app bundle using the jarsigner tool.
You should use choose the same Project Key Alias of the Keystore.
I tried to build new apk file of my app, but got error
What went wrong:
Execution failed for task ':app:validateSigningRelease'.
Keystore file not set for signing config release
previous version of my app that don't have purchases was build correctly but right now it's dosen't.
I found a lot informations how to set KeyStore file but nothing about what is it.
May you explain what is it
Basically Keystore is used to store private key and identity certificates that a specific program should present to both parties (server or client) for verification.
The Android Keystore system lets you store cryptographic keys in a container to make it more difficult to extract from the device. Once keys are in the keystore, they can be used for cryptographic operations with the key material remaining non-exportable. Moreover, it offers facilities to restrict when and how keys can be used, such as requiring user authentication for key use or restricting keys to be used only in certain cryptographic modes. See Security Features section for more information.
The Keystore system is used by the KeyChain API, introduced in Android 4.0 (API level 14); the Android Keystore provider feature, introduced in Android 4.3 (API level 18); and the Security library, available as part of Jetpack. This document goes over when and how to use the Android Keystore provider.
For details information please refer to this -
https://developer.android.com/training/articles/keystore
I have generated my SHA1 code from my keystore but when I try to create an OAuth client 2.0, Google game console is giving me the error: "Certificate fingerprint is invalid".
Anyone knows why this happens?
How do I fix this?
I've contacted Google Play Developer Support about this issue (I've got a same problem).
Here is their answer : Please ensure the key is set to 2048 bit and is valid for at least 25 years.
I've tried it, but sadly my debug.keystore is still not getting accepted, maybe there will be some luck on your side.
$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
I'm Dan, and I'm a software engineer on Play Games Services.
First, let me thank you for using our service, and apologize for the inconvenience caused. We have discovered a bug in our product that prevents users from linking fingerprints of their signing keys to newly created applications. The issue has been fixed and you should be able to link your application as expected.
If you encounter a bug in the feature, please let us know using the bug report tool (Help -> Need more help? -> Send feedback & report bugs).
I ran into this issue recently.
After I added an Android credential, the Google Play Console pops up a modal with the app name and an SHA-1 fingerprint. For some reason this fingerprint is incorrect.
In the Google Play Console You need to go to Release -> App Integrity,and copy the SHA-1 certificate fingerprint under App signing key certificate.
Ok that is weird. I encountered the same problem. while I have done this numerous time in the past, never had this issue before. I tried with multiple options but still no go. So figured out a workaround. Thought of sharing it to save time:
Once you create a Game Service, You will get the API console project under -> Game Details > Api Console Project
Click your API project, and it should take you to your API console project.
Create Auth SHA1 keys by choosing credentials > create credentials.
Now, Google site do suggest not to do it
Warning: Do not create new client IDs for your game from the Google API Console. If you do so, Google Play games services will not associate your game settings with the client ID, and this could cause errors during gameplay.
https://developers.google.com/games/services/console/enabling
But as far I Have only one Sha1 for this package, I think we are good. I can confirm that my project is working fine and I am able to successfully linked the app. Although, I have still not tested all my games features.
Also, I am still figuring out the reason on why it works from Google API console with the same Sha1 key and package and will not work if I use the same combination from Play console -> linked apps. I will update on this thread as I learn more. Perhaps Google is changing the OAuth screen consent screen, may be this is a new change now.
I implement Google Game Service for Android (Cocos2d-x) with Cocos Helper of Sonar System Team.
Everything is OK:
Sign-In Google Game Service.
Show Achievement and increateAchievement very good.
The first time, I sign-in to Google Game Service ==> show leaderboard is OK.
However, I submit score to leaderboard then re-show leaderboard again it always close automatic and I get respondCode=RESULT_RECONNECT_REQUIRED.
Can you give me some suggestion to fix it ?
I've found answer:
Reason of issue is OAuth2 Client ID form Game Services Console ==> ==> Link apps didn't equal with OAuth2 Client ID, be created at API Manager:
So to fix that, you must create new Link Apps in Google Service Console.
==> That will fix on server and leaderboard will working OK .
In my case, I had two OAuth2 clients configured: one associated with the development certificate SHA fingerprint (keytool -exportcert -keystore ~/.android/debug.keystore -list -v) and one associated with the release certificate SHA fingerprint (keytool -exportcert -keystore path/to/your/release.keystore -list -v).
While debugging, the apk was signed with the development certificate, and after submitting a score to the leaderboard, the next time I opened the leader board, it closed automatically without showing the leaderboard or an error message. After this, the only way to be able to use the leader board again, was uninstalling the tested app and the Google Play Games app from the device.
To be able to separate the development and release Google Play Services OAuth2 configuration, you can have two google-services.json files: one on the src/debug folder and another on the src/release folder.
When I used an apk was signed with the release certificate, the leaderboard worked properly before and after submitting scores to the leaderboard.
My conclusion: to be able to test the leaderboard you must use an apk signed with a release certificate.
I write with Corona SDK a mobile application that integrates with Facebook. So I created a Facebook application that App ID I use for integration.
In login session from mobile device, I received a error with response "android key ....". The solution for the problem was to set a "Android Key Hash" in "Native Android App" of the application. But I don't understand exactly what does mean "Android Key Hash" and what I did. Can somebody pleases explain me about?
Could I still receive the same error if I run an application on other device or this "Android Key Hash" is unique for all my application's users?
You wont get an error provided you use the correct hash key. You can generate one by using this command:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
If you are getting an error at that point try using a non debug keystore to sign and/or take a look at this post from the Corona SDK forums; http://developer.coronalabs.com/forum/2012/03/20/facebook-and-android-key-hash