Hello, I am still getting CANNOT_AUTHORISE on initialization. I have followed all of the steps seen in previous threads. The package name is hard to get wrong but have noticed people have been saying that the signature generated is the problem in some cases. What steps have people gone through to get a correct signature? Thanks Chris
Hi, 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.
Thanks for the reply. I have been through the steps mentioned previously with no success. I currently have around ten entries in the whitelist registry section as I try different combinations with the signature. Such as not adding the base64 option and converting manually afterwards. Trying md5 rather than sha1 etc. I can remember someone saying the correct signature appeared in an adb log - if anyone can show me how to retreive this then I would be very grateful.Thanks all Chris.
Hi, To generate correct signature please ensure to use the debug keystore password as "android" while generating the signature by using the below command. This is the unique key provided by the Android system for signing your app. Please refer link for more information on Signing in Debug Mode section (
http://developer.android.com/tools/publishing/app-signing.html). keytool -exportcert -alias androiddebugkey -keystore | openssl sha1 -binary | openssl base64 Hope this information helps you.
Hello, thanks for the reply. This is the first thing I tried as these are the steps in the GameCircle Documentation. I am focusing on the signature as people have noted in other threads that in some cases the correct signature is not generated by keytool. Some have had to do generate it on a Mac, others have manually encoded the sha1 signature to base64. I have tried all suggested solutions without success - apart from using a Mac, as I dont have one!. I am using the package name from the AndroidManifest.xml. I have around 10 whitelist registry entries (I have asked for these to be wiped), with different methods of obtaining signatures. The first being generated via the method stated in last post. "keytool -exportcert -alias androiddebugkey -keystore | openssl sha1 -binary | openssl base64" The kindle is up to date with GameCircle, no update option exists. The kindle is signed in to the linked amazon account, with a nickname set to my GameCircle profile name. And still I get CANNOT_AUTHORISE!!!! As you can imagine I am now at the frothing at the mouth stage. If anyone can offer any further advice I would be grateful. Chris
Hi Chris, Please raise a ContactUs (
https://developer.amazon.com/help/contactus.html) with your app details along with Leaderboards/Achievements Ids and one of our support engineer will look into your issue. Also, please provide logcat information with "Cannot Authorize" error in the Contactus.
Hello again, I sent my logcat to your guys but they came up with the same instructions as stated before. One thing to note is that the string I get by just doing: [b]keytool -exportcert -myalias androiddebugkey -keystore mykeystorepath[/b]is a very long binary string and the computer beeps for a second or two. By doing the full command: [b]keytool -exportcert -myalias androiddebugkey -keystore mykeystorepath | openssl sha1 -binary |openssl base64[/b] produces a string along the format: [b]b4haXVvbj0g27Wg=[/b]Does the second one look right? The package name is just stolen from AndroidManifest.xml and so I cant go wrong there. As before, any more help or a solution would be grateful thanks Chris
Sorry to necro a half dead thread... I recently was having problems with this myself and didn't see a decent explanation of a fix. It took me about 20 whitelist attempts to finally figure it out. As far as I know, there is no way to determine the signature from adb logcat output (as other threads have suggested). There also seems to be a bug in either the keytool or openssl on windows, or perhaps there is a small difference between the win32 binaries and *nix binaries output. [b]I was only able to get a correct signature from my keystore on a linux machine.[/b] I have no explanation why. It just worked, and I almost pulled my hair out over it. Maybe because that linux machine also happens to be running an Amazon AMI. Perhaps the difference in signatures was due to the difference in line endings between windows and *nix. Also, several examples mention using the debug keystore. Only use that if your app is actually signed with the debug keystore (not sure about if you let Amazon sign it).