question

KevinCV avatar image
KevinCV asked

GameCircle works perfectly - until our APK gets publish on Amazon App Store

We have an app running the GameCircle Unity plugin. It builds, installs, and runs GameCircle features [u][i][b]perfectly[/b][/i][/u] in our local testing. But once it gets published on the Amazon App Store, downloaded, and run, GameCircle fails with API key errors. Again, the local version of the APK shows the GameCircle welcome banner, adds the side menu for Gamecircle, posts leaderboard scores, etc. It has no logcat errors or issues of any kind. But once that [b][u][i]very same working APK [/i][/u][/b] is submitted, approved and published on Amazon, the resultant downloaded binary fails to run GameCircle. I can sideload the APK and it runs fine, download it from the Amazon App Store, and it fails. It has been pretty frustrating for us. We'd love to know why these API errors only happen after publication through the app store, how to fix it, and how to test for it before publication in the future! ---------------------------- LOGCAT OUTPUT ------------------------------------- D/com.amazon.identity.auth.device.utils.MAPLog.PII(12546): Extracting verison incremental: D/com.amazon.identity.auth.device.utils.MAPLog.PII(12546): Extracting flavor: D/com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager.PII(12546): AmazonAuthorizationManager:sdkVer=1.0.0 libVer=3.3.0: I/com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager(12546): Options bundle is null I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier(12546): getAppInfo : packageName=com.codedvelocity.sirhoppity I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier(12546): Finding API Key for com.codedvelocity.sirhoppity I/com.amazon.identity.auth.device.utils.ThirdPartyResourceParser(12546): Attempting to parse API Key from assets directory I/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): Begin decoding API Key for packageName=com.codedvelocity.sirhoppity D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII(12546): APIKey: I/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): num sigs = 1 D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII(12546): Signature checking.: D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII(12546): Fingerpirint checking: W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): Failed to decode: Decoding fails: certificate fingerprint can't be verified! W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): java.lang.SecurityException: Decoding fails: certificate fingerprint can't be verified! W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.identity.auth.device.appid.APIKeyDecoder.verifyPayload(APIKeyDecoder.java:332) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.identity.auth.device.appid.APIKeyDecoder.doDecode(APIKeyDecoder.java:127) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.identity.auth.device.appid.APIKeyDecoder.decode(APIKeyDecoder.java:91) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.identity.auth.device.appid.AbstractAppIdentifier.getAppInfo(AbstractAppIdentifier.java:85) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager. (AmazonAuthorizationManager.java:123) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.ags.api.AmazonGamesClient.initialize(AmazonGamesClient.java:131) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.amazon.ags.api.unity.AmazonGamesClientProxyImpl$1.run(AmazonGamesClientProxyImpl.java:67) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at android.os.Handler.handleCallback(Handler.java:747) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at android.os.Handler.dispatchMessage(Handler.java:92) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at android.os.Looper.loop(Looper.java:151) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at android.app.ActivityThread.main(ActivityThread.java:5185) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at java.lang.reflect.Method.invokeNative(Native Method) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at java.lang.reflect.Method.invoke(Method.java:511) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) W/com.amazon.identity.auth.device.appid.APIKeyDecoder(12546): at dalvik.system.NativeStart.main(Native Method) E/GameCircleClient(12546): Unable to read api key. GameCircle requires an api key to be included in 'assets/api_key.txt'. GameCircle will not initialize. E/GameCircleClient(12546): java.lang.IllegalArgumentException: Invalid API Key E/GameCircleClient(12546): at com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager. (AmazonAuthorizationManager.java:126) E/GameCircleClient(12546): at com.amazon.ags.api.AmazonGamesClient.initialize(AmazonGamesClient.java:131) E/GameCircleClient(12546): at com.amazon.ags.api.unity.AmazonGamesClientProxyImpl$1.run(AmazonGamesClientProxyImpl.java:67) E/GameCircleClient(12546): at android.os.Handler.handleCallback(Handler.java:747) E/GameCircleClient(12546): at android.os.Handler.dispatchMessage(Handler.java:92) E/GameCircleClient(12546): at android.os.Looper.loop(Looper.java:151) E/GameCircleClient(12546): at android.app.ActivityThread.main(ActivityThread.java:5185) E/GameCircleClient(12546): at java.lang.reflect.Method.invokeNative(Native Method) E/GameCircleClient(12546): at java.lang.reflect.Method.invoke(Method.java:511) E/GameCircleClient(12546): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/GameCircleClient(12546): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/GameCircleClient(12546): at dalvik.system.NativeStart.main(Native Method) I/Unity (12546): AmazonGameCircle: GameCircleManager - serviceNotReady null
10 |5000

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

KevinCV avatar image
KevinCV answered
Amazon support indicated that this can happen if you create a Security Profile, but do not associate it with an app. We had assumed this happened at time of profile creation. We've gone back through our app, selected the security profile link, and applied the listed profile. We'll post the result and let you know what happens.
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 Kevin, This should work now since you have associated the security profile with your app. The details of security profile is discussed in below thread. https://forums.developer.amazon.com/forums/thread.jspa?threadID=2072&tstart=30
10 |5000

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