question

chrispop101 avatar image
chrispop101 asked

GameCircle: CANNOT_AUTHORIZE

I created a simple application in order to test out Game Circle. The problem is that when I run the app on my Kindle Fire I'm getting the CANNOT_AUTHORIZE error. The documentation seems to indicate that the problem is caused by not registering the package name and signature properly with Amazon. My package name is com.example.kindletest I then generated a signature using keytool as follows. I verified that the alias that I passed in matches the alias of my keystore: C:\Program Files\Java\jdk1.7.0_01\jre\bin>keytool -exportcert -alias androidkeys torealias -keystore G:\VirtualMachines\Android_Keys\AndroidKeystore | "h:\cygwin \bin\openssl.exe" sha -binary | "h:\cygwin\bin\openssl.exe" base64 I ran this twice. The first time I entered my normal password which gave me a signature. I then ran it again and entered the "android" password which gave me a different signature. I registered both signatures with the same package name on the server. I then tried running my app as follows: 1. I exported a signed .apk and pushed it to the kindle fire using ADB. When I run it I get the CANNOT_AUTHORIZE error. 2. I tried running the application directly from eclipse and I selected the Kindle Fire as my target. This method also gives me the CANNOT_AUTHORIZE error. 08-04 14:18:52.121: D/AGC_ServiceProxy(11272): Changing Status from:INITIALIZING to: CANNOT_AUTHORIZE I'm not sure where to go from here. Has anyone else run into this?
10 |5000 characters needed characters left characters exceeded

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

mnedev avatar image
mnedev answered
I have this problem when I run my app on my Kindle Fire. Package name matched exactly the name I used in My Apps on Amazon dev site. I registered my debug key into Amazon's Game Circle Whitelist Registry. My app isn't submitted, I wonder if that has anything to do with this CANNOT_AUTHORIZE error.
10 |5000 characters needed characters left characters exceeded

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

Anshul@Amazon avatar image
Anshul@Amazon answered
Here's the general guidelines that can be followed incase 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.1. 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. Please let us know if any of these ideas resolves your problem.
10 |5000 characters needed characters left characters exceeded

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