question

tamhan-tmgn avatar image
tamhan-tmgn asked

CANNOT_AUTHORIZE error on startup for Kindle Fire

Hello Folks, I am coding in Slovakia on a little demo app for the GameCircle, which will be published in a German newspaper. My issue is that running the app on the real device (firstgen Kindle fire) always produces CANNOT_AUTHORIZE. On the emulator for the Fire FirstGen, I get this error: 02-12 17:41:14.839: E/AGC_ServiceProxy(411): Amazon Games Service is not available 02-12 17:41:14.839: D/AGC_ServiceProxy(411): Changing Status from:INITIALIZING to: CANNOT_BIND 02-12 17:41:14.879: E/GC_AmazonGamesClient(411): Failed to enable softkey button: android.content.pm.PackageManager$NameNotFoundException: com.amazon.ags.app 02-12 17:41:14.940: I/AGC_AmazonGamesStatusHandler(411): Game received status update of: CANNOT_BIND 02-12 17:41:14.940: E/AGS(411): CANNOT_BIND Anyone know what is up here? I already googled, but did not find much!
10 |5000

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

Sachin@Amazon avatar image
Sachin@Amazon answered
Hi, When testing your Amazon GameCircle integration, if you get the CANNOT_AUTHORIZE AmazonGamesStatus from the Initialize() callback, it is most likely that you have not registered the package name and signature of the game build properly. Here's the general guidelines that can be followed in case you get CANNOT_AUTHORIZE error 1) Test on a Kindle Fire device. Amazon GameCircle features are only available on Kindle Fire devices. 2) Make sure the device is signed in with an Amazon account. GameCircle uses the account that the device is signed in with to authenticate the player. 3) Make sure the device has been updated to the latest version of the Fire OS. To do this, go to the top menu, tap More, tap Device, click the Update your Kindle button if it is enabled. 4) Make sure you're using the latest version of the GameCircle API. The current version is 1.2.2. 5) Make sure that the keytool command you used to get the signature returned a valid result. To do this, run the first part of the command line separately: keytool -exportcert -alias androiddebugkey -keystore [path to your keystore file] This command should return a very long string that represents your certificate. If the path to your keystone is wrong, it will return an error message. After this you get valid results from this command, then run the full command line to get the signature: keytool -exportcert -alias androiddebugkey -keystore [path to your keystore file] | openssl sha1 -binary | openssl base64 This will return your signature string. Please check that this is the string that you have registered in the GameCircle Portal. Few links that may help you on this issue: https://forums.developer.amazon.com/forums/thread.jspa?messageID=211Ó https://forums.developer.amazon.com/forums/thread.jspa?messageID=2297ࣹ https://developer.amazon.com/sdk/gamecircle/documentation/gamecircle-setup.html#Section6 Please let us know if any of these ideas resolves your problem. Thank you.
10 |5000

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

md9261 avatar image
md9261 answered
I had the same problem and followed the steps but still had a CANNOT_AUTHORIZE error even after putting the signature in the whitelist registry. My problem was somehow the wrong key signature was showing up using the keytool export base64 command. What I did instead is get the SHA1 signature and then converted it to base64. Message was edited by: Sachin@Amazon
10 |5000

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

Sachin@Amazon avatar image
Sachin@Amazon answered
Thank you John for your reply. This would surely help other developers as well.
10 |5000

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