question

MDG avatar image
MDG asked

Unable to Initialize GameCircle: certificate fingerprint can't be verified!

I am trying to integrate GameCircle with a couple of my apps (a paid and free version) and cannot get past initialization, despite my best efforts to follow the instructions to the letter. One complication is that I had set up security profiles for these apps last year sometime, but only now have had the time to work on the integration, so I created a new profile for both apps and followed the instructions for that profile, but I half-suspect that the old profiles may be causing the errors. I did grab the latest SDK and I'm testing against the KindleFireHDX8.9 emulator. The error is related to the API key. I've double-checked the MD5 I used and it seems correct. Could it be something with my emulator? 10-26 15:56:45.528: D/com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager.PII(2921): AmazonAuthorizationManager:sdkVer=1.0.0 libVer=3.3.0: 10-26 15:56:45.528: I/com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager(2921): Options bundle is null 10-26 15:56:45.528: I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier(2921): getAppInfo : packageName=com.sengin.android.rozz 10-26 15:56:45.528: I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier(2921): Finding API Key for com.sengin.android.rozz 10-26 15:56:45.538: I/com.amazon.identity.auth.device.utils.ThirdPartyResourceParser(2921): Attempting to parse API Key from assets directory 10-26 15:56:45.600: I/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): Begin decoding API Key for packageName=com.sengin.android.rozz 10-26 15:56:45.738: D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII(2921): APIKey: 10-26 15:56:45.748: I/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): num sigs = 1 10-26 15:56:45.758: D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII(2921): Signature checking.: 10-26 15:56:45.778: D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII(2921): Fingerpirint checking: 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): Failed to decode: Decoding fails: certificate fingerprint can't be verified! 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): java.lang.SecurityException: Decoding fails: certificate fingerprint can't be verified! 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.amazon.identity.auth.device.appid.APIKeyDecoder.verifyPayload(APIKeyDecoder.java:332) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.amazon.identity.auth.device.appid.APIKeyDecoder.doDecode(APIKeyDecoder.java:127) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.amazon.identity.auth.device.appid.APIKeyDecoder.decode(APIKeyDecoder.java:91) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.amazon.identity.auth.device.appid.AbstractAppIdentifier.getAppInfo(AbstractAppIdentifier.java:85) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager. (AmazonAuthorizationManager.java:123) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.amazon.ags.api.AmazonGamesClient.initialize(AmazonGamesClient.java:126) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.sengin.android.rozz.library.MainActivity.onResume(MainActivity.java:412) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1185) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.Activity.performResume(Activity.java:5248) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2794) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2841) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2294) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.ActivityThread.access$600(ActivityThread.java:146) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1245) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.os.Handler.dispatchMessage(Handler.java:99) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.os.Looper.loop(Looper.java:137) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at android.app.ActivityThread.main(ActivityThread.java:5150) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at java.lang.reflect.Method.invokeNative(Native Method) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at java.lang.reflect.Method.invoke(Method.java:511) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 10-26 15:56:45.808: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(2921): at dalvik.system.NativeStart.main(Native Method) 10-26 15:56:45.838: E/GameCircleClient(2921): Unable to read api key. GameCircle requires an api key to be included in 'assets/api_key.txt'. GameCircle will not initialize. 10-26 15:56:45.838: E/GameCircleClient(2921): java.lang.IllegalArgumentException: Invalid API Key Regards
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Bipin@Amazon avatar image
Bipin@Amazon answered
We see that you have multiple security profiles for package name (com.sengin.android.rozz), Can you please make sure that the you have added the API key generated with MD5 finger print in api_ket.txt Example MD5 pattern = F4:81:0C:AA:3E:45:DE:45:57:F2:BE:DE:95:A8:E1:63 ( https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-config.html#Section5) MD5 finger print and package name are used to generate API key and same security profile has to be used in the Game. Security Profiles has to be linked from a GameCircle Configuration.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

MDG avatar image
MDG answered
Yes, thank you. I do have the MD5 fingerprint in the api_key.txt file as per the instructions. In another thread, it was mentioned that the emulators do not work with the new GameCircle API, so I have assumed that to be my problem. Is that your understanding, that the emulators do not work with the new API? Regards, Matt
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi MDG, Thank you for writing back. Yes as I mentioned in other thread ( https://forums.developer.amazon.com/forums/thread.jspa?threadID=1546&tstart=0) that GameCircle 2.0 is not supported in emulator at this moment. We are working one it and we are going to release emulator update with the fix shortly. But I can not commit on any ETA for this. Sorry for the inconvenience.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

MDG avatar image
MDG answered
Quite all right -- thanks for the update.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.